webOS Nation Forums >  Homebrew >  webOS themes > Trying to work in root ACCESS denied?
Trying to work in root ACCESS denied?

  Reply
 
LinkBack Thread Tools Display Modes
Old 09/18/2009, 09:23 PM   #1 (permalink)
Member
 
Addie_Goodvibes's Avatar
 
Join Date: Feb 2007
Location: Hermosa Beach
Posts: 502
Likes Received: 0
Thanks: 116
Thanked 42 Times in 33 Posts
Default Trying to work in root ACCESS denied?

I am in Root ( I believe)
Trying tio apply the following patch/change

Email delete all

I typed the following *** per instructions on webos internals page


Quote:
root@castle:/var/home/root# /usr/palm/applications/com.palm.app.email/app/controllers/list-assistant.js
-sh: /usr/palm/applications/com.palm.app.email/app/controllers/list-assistant.js: Permission denied

It said permission denied?

Have I missed a step?
Addie_Goodvibes is offline   Reply With Quote
Old 09/19/2009, 01:22 AM   #2 (permalink)
Member
 
Addie_Goodvibes's Avatar
 
Join Date: Feb 2007
Location: Hermosa Beach
Posts: 502
Likes Received: 0
Thanks: 116
Thanked 42 Times in 33 Posts
Default

Bump.. Sorry all just have a question about my Root experience. see my previous post
I keep getting access denied while trying to access files to change

Also Can I access root and change things without SSH'ng?



I followed all the steps on Webos Internals managed to get root access from my windows CMD line

But when i try to SSH into I log in as root or so I think and then I do an LS command and NOTHING comes up

any help would be appreciated


Quote:
login as: addie
addie@192.168.1.2's password:
addie@castle:~$ cd /
addie@castle:/$ ls -l
drwxr-xr-x 2 root root 4096 Jul 17 22:14 bin
drwxr-xr-x 12 root root 4096 Jul 23 17:17 boot
drwxr-xr-x 17 root root 3260 Sep 18 23:11 dev
drwxr-xr-x 2 root root 4096 Jul 23 17:14 dspbridge
drwxr-xr-x 44 root root 4096 Sep 18 22:24 etc
drwxr-xr-x 2 root root 4096 Jul 23 17:08 home
drwxr-xr-x 6 root root 4096 Jul 17 22:13 lib
drwx------ 2 root root 16384 Dec 31 1999 lost+found
-rw-r--r-- 1 root root 870229 Jun 16 18:58 md5sums
drwxr-xr-x 11 root root 4096 Sep 17 10:23 media
drwxr-xr-x 2 root root 4096 Jul 23 17:08 mnt
drwxr-xr-x 12 root root 4096 Sep 18 22:43 opt
dr-xr-xr-x 106 root root 0 Dec 31 1969 proc
drwxr-xr-x 2 root root 4096 Sep 18 18:45 root
drwxr-xr-x 3 root root 4096 Jul 23 17:17 sbin
drwxr-xr-x 12 root root 0 Dec 31 1969 sys
drwxrwxrwt 9 root root 1120 Sep 18 23:43 tmp
drwxr-xr-x 14 root root 4096 Jul 17 22:25 usr
drwxrwxr-x 26 root root 4096 Sep 18 18:40 var
addie@castle:/$ sudo su -
Password:
root@castle:/var/home/root# cd /
root@castle:/# ls -l
drwxr-xr-x 2 root root 4096 Jul 17 22:14 bin
drwxr-xr-x 12 root root 4096 Jul 23 17:17 boot
drwxr-xr-x 17 root root 3260 Sep 18 23:11 dev
drwxr-xr-x 2 root root 4096 Jul 23 17:14 dspbridge
drwxr-xr-x 44 root root 4096 Sep 18 22:24 etc
drwxr-xr-x 2 root root 4096 Jul 23 17:08 home
drwxr-xr-x 6 root root 4096 Jul 17 22:13 lib
drwx------ 2 root root 16384 Dec 31 1999 lost+found
-rw-r--r-- 1 root root 870229 Jun 16 18:58 md5sums
drwxr-xr-x 11 root root 4096 Sep 17 10:23 media
drwxr-xr-x 2 root root 4096 Jul 23 17:08 mnt
drwxr-xr-x 12 root root 4096 Sep 18 22:43 opt
dr-xr-xr-x 107 root root 0 Dec 31 1969 proc
drwxr-xr-x 2 root root 4096 Sep 18 18:45 root
drwxr-xr-x 3 root root 4096 Jul 23 17:17 sbin
drwxr-xr-x 12 root root 0 Dec 31 1969 sys
drwxrwxrwt 9 root root 1140 Sep 18 23:47 tmp
drwxr-xr-x 14 root root 4096 Jul 17 22:25 usr
drwxrwxr-x 26 root root 4096 Sep 18 18:40 var
root@castle:/#

Last edited by Addie_Goodvibes; 09/19/2009 at 01:52 AM.
Addie_Goodvibes is offline   Reply With Quote
Old 09/19/2009, 02:39 AM   #3 (permalink)
Member
 
Join Date: Aug 2009
Posts: 1,130
Likes Received: 3
Thanks: 87
Thanked 388 Times in 220 Posts
Default

The problem is that you're working as "addie" but as you can see, all of those files and folders belong to root.

You have three options.

1. Work as root the whole time by entering the following command:
Code:
sudo -i
2. work as root only as needed by retyping any commands that return access denied with the word sudo before the command. Example:
Code:
sudo rm -rf /
3. Stop using SSH and just use novaterm over USB, which logs you in as root automatically.
VeeDubb65 is offline   Reply With Quote
Thanked By: Addie_Goodvibes
Old 09/19/2009, 04:47 AM   #4 (permalink)
Member
 
Addie_Goodvibes's Avatar
 
Join Date: Feb 2007
Location: Hermosa Beach
Posts: 502
Likes Received: 0
Thanks: 116
Thanked 42 Times in 33 Posts
Default

Quote:
Originally Posted by VeeDubb65 View Post
The problem is that you're working as "addie" but as you can see, all of those files and folders belong to root.

You have three options.

1. Work as root the whole time by entering the following command:
Code:
sudo -i
2. work as root only as needed by retyping any commands that return access denied with the word sudo before the command. Example:
Code:
sudo rm -rf /
3. Stop using SSH and just use novaterm over USB, which logs you in as root automatically.
Thanks I managed to get into root, I was in wrong directory, Also

Does Novaterm via USB allow me to edit files or do i need to SSH for changes?
Addie_Goodvibes is offline   Reply With Quote
Old 09/19/2009, 04:55 AM   #5 (permalink)
Member
 
Join Date: Aug 2009
Posts: 1,130
Likes Received: 3
Thanks: 87
Thanked 388 Times in 220 Posts
Default

Novaterm gives you full root terminal access. Which means, anything that can be done from any terminal on your Pre, can be done through novaterm.

The reason so many of the tutorials recommend setting up and using SSH is that with SSH, you can connect to your Pre over WiFi, or with some extra steps you can even connect to it over EVDO.

That can be handy if you want to set up an SFTP server or if you find yourself constantly needing root access, but it's generally not needed anymore unless you are a developer or the type that needs to try out every tweek and patch the instant somebody comes up with it, rather than waiting for it to hit the WebOSQuickinstall.
VeeDubb65 is offline   Reply With Quote
Thanked By: Addie_Goodvibes
Old 10/04/2011, 12:53 PM   #6 (permalink)
Member
 
Join Date: Sep 2011
Location: India
Posts: 21
Likes Received: 1
Thanks: 3
Thanked 1 Time in 1 Post
Default

i get the same problem in novaterm where pixi+ running webOS2.1 is connected via USB.

Can you help me sort out this problem,

thanks
ashishha is offline   Reply With Quote
Old 10/05/2011, 05:28 AM   #7 (permalink)
Member
 
alex80386's Avatar
 
Join Date: Sep 2011
Location: New Zealand
Posts: 127
Likes Received: 5
Thanks: 6
Thanked 24 Times in 17 Posts
Default

Quote:
Originally Posted by Addie_Goodvibes View Post

Email delete all

I typed the following *** per instructions on webos internals page

Code:
root@castle:/var/home/root# /usr/palm/applications/com.palm.app.email/app/controllers/list-assistant.js
-sh: /usr/palm/applications/com.palm.app.email/app/controllers/list-assistant.js: Permission denied
It said permission denied?

Have I missed a step?
The instruction said to "open" the file, but it appears that you might be attempting to execute the file.

Quote:
Originally Posted by ashishha View Post
i get the same problem in novaterm where pixi+ running webOS2.1 is connected via USB.
In that case, if the problem is the same, the answer is also the same.

If you simply enter the filename in a Unix/Linux shell, it tries to execute the file, but I'm sure that file won't be executable from the shell.

To execute use:

Code:
/path/to/files/executable-file
To list the names, size and attributes of files in a directory use the 'ls' command:

Code:
ls -l /path/to/files/
To view the contents of a file:

Code:
less /path/to/files/filename.js
To open a file for editing, you need to use an editor... if you know and love vi (and who doesn't?), use the vi editor. Or you could use nano which is a bit more user friendly for people that are new to the *nix command line. Nano can be installed from preware.

To begin editing using nano:

Code:
nano /path/to/files/filename.js
Make your changes and save. Oh, yeah... one more thing, please make a backup of any file you want to edit first, in case you screw things up.

Code:
cp -p /path/to/files/filename.js /media/internal/filename.js.orig
Now you have a backup of the original file in case you need it later...

Last edited by alex80386; 10/05/2011 at 08:08 AM.
alex80386 is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0