LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I reset my permissions to solve Nautilus problem? (http://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-reset-my-permissions-to-solve-nautilus-problem-799647/)

steve francis 04-02-2010 04:14 PM

How can I reset my permissions to solve Nautilus problem?
 
The problem:

When I click on a folder under the Places menu or start File Manager, the File Manager window appears. When I then click on any file or folder to open it, File Manager just freezes.

I then have to force quit and receive the error message "File Manager not responding".

When I force quit my desktop items are missing!

Some additional information:

(a) GNOME commander works fine.

(b) If I open up Terminal and just type nautilus, I get the error message
** (nautilus:5550): WARNING **: Unable to add monitor: Not supported
and then I have to force quit the file browser.

(c) I found out that nautilus does not hang when I type
gksudo nautilus

Solutions already attempted:

(1) I tried reinstalling Nautilus using this code:
sudo apt-get remove nautilus
sudo apt-get install nautilus
This succeeded in uninstalling and reinstalling Nautilus but the File Browser still hangs when I double click on a file within it.

(2) Typing the following command in root did not solve the problem.
sudo chmod 700 /home/me

mreschke 04-02-2010 04:32 PM

Reset nautilus
 
Installing and re-installing nautilus won't really do anything because your config files are still there. Try re-setting nautilus to it's default settings by deleting its config files. 'rm -rf ~/.nautilus'

steve francis 04-02-2010 04:46 PM

Quote:

Originally Posted by mreschke (Post 3922151)
Try re-setting nautilus to it's default settings by deleting its config files. 'rm -rf ~/.nautilus'

I opened up terminal from my user desktop and entered
rm -rf ~/.nautilus
then I ran Nautilus and it still hung.

Should I type "sudo" before that command?

steve francis 04-02-2010 05:02 PM

Actually, using Gnome Commander to look at the permissions for Nautilus, they are rwxrwxrwx (that is, 777).

There are no files in the folder .Nautilus, just another folder called metafiles

knudfl 04-02-2010 06:12 PM

The permissions for /home/<username>/ : 751 → drwxr - xr - x

The hidden files, the config files for 'nautilus' :
/home/<username>/.gconf/apps/nautilus
/home/<username>/.gconf/apps/metacity

ls -aR | grep nautilus
.. will show, and I looked into ~.gconf/apps/ and saw metacity.
I don't know, which file, causes the problems, but new default
configurations will be written after you delete them.
.....

steve francis 04-02-2010 06:36 PM

Quote:

Originally Posted by knudfl (Post 3922256)
The hidden files, the config files for 'nautilus' :
/home/<username>/.gconf/apps/nautilus
/home/<username>/.gconf/apps/metacity

I deleted these two files and the .nautilus folder and rebooted. Unfortunately the problem isn't solved.

With regards to your permissions suggestion:

If I open terminal and type
gksudo nautilus
then enter my password, Nautilus starts up and works without a problem.

Within Nautilus, I can then browse to 'home'.

If I right click on home and the Permissions tab, I get

Owner: root
Folder access: Create and delete files
File access: ---

Group: root
Folder access: Access files
File access: ---

Others
Folder access: Access files
File access: ---

Is that to be expected?

If I go back to the Nautilus window and click on home and then right click on my username folder, I get

Owner: me
Folder access: Create and delete files
File access: ---

Group: me
Folder access: None
File access: ---

Others
Folder access: None
File access: ---

Is that to be expected?

If I go back to the Nautilus window and click on home and then left click on my username folder and then on Desktop, then Nautilus hangs!

I've removed all my files from the Desktop in case it was a filename with a bad character. This had no effect.

knudfl 04-02-2010 06:46 PM

I never saw 'nautilus' hang or freeze.

But may be try the command : nautilus
in the terminal, and watch the terminal text,
to see if it's showing some errors.

.....
And by the way : /home/ itself is owned by root.

.....

steve francis 04-02-2010 06:55 PM

Quote:

Originally Posted by knudfl (Post 3922280)
I never saw 'nautilus' hang or freeze.
But may be try the command : nautilus
in the terminal, and watch the terminal text,
to see if it's showing some errors.

Nautilus hangs until I force quit. In terminal all I can see is
me@mypc:~$ nautilus
Killed
me@mypc:~$

Quote:

Originally Posted by knudfl (Post 3922280)
And by the way : /home/ itself is owned by root.

Thanks. Please may I ask if my quoted permissions for home and username are the 'default' permissions?

10110111 04-02-2010 07:14 PM

Seems some or all of your $HOME files are owned by root. Try this to set your $HOME to be owned by you:
Code:

sudo chown your_username -R $HOME
where your_username is your user name.

steve francis 04-02-2010 07:35 PM

Quote:

Originally Posted by 10110111 (Post 3922295)
Seems some or all of your $HOME files are owned by root. Try this to set your $HOME to be owned by you:
Code:

sudo chown your_username -R $HOME
where your_username is your user name.

Thanks for your suggestion. Before I do this, can I clarify something, please?

knudfl said
Quote:

Originally Posted by knudfl (Post 3922280)
And by the way : /home/ itself is owned by root.

Should 'home' be owned by 'root' or 'your_username' ? - I don't quite understand

mreschke 04-02-2010 07:36 PM

Steve,

The permissions you stated are correct. /home should be root:root 755, and your normal users /home/user would be user:user 755. I doubt that permission are your problems, but just to get things on the right track, run these commands (substituting your username for 'user' below)

sudo chown root:root /home
sudo chown user:user /home/user -R
sudo chmod 755 /home
sudo chmod 755 /home/user
sudo chmod u+r /home/user -R
sudo chmod u+w /home/user -R

This insures that all your /home/user files have at least R and W for your username

When you run nautilus as sudo or gksudo you are running as the root user, so instead of using the normal nautilus config locations of /home/user/.nautilus or /home/user/.gconf... you are using /root/.nautilus and /root/.gconf... So I would guess that the root config files are good, and your user config files might be causing a freeze.

BEST Troubleshooting solution
As a quick test you can try creating a brand new user on your linux machine, then logging into gnome with that new user (all new config files). You could use this new user to see what default permissions are too.

ALSO, I have seen nautilus freeze quite a bit, but it's usually only for a minute or so. Try letting it sit for a few minutes (5 or 10), don't click around just let it sit. If it hangs for a few minutes, kill it, logout then back into reset your desktop, open nautilus again and click somewhere else (open a different folder), try to narrow down what folder is causing it.

I don't think this error is related, but you should google around and try to fix it anyway:
(nautilus:5550): WARNING **: Unable to add monitor: Not supported

this should not happen, by simply typing 'nautilus &' in the terminal after it crashes should restore all desktop icons and functionality.

steve francis 04-03-2010 01:46 AM

Quote:

Originally Posted by mreschke (Post 3922305)
Steve,
I doubt that permission are your problems, but just to get things on the right track, run these commands (substituting your username for 'user' below)

sudo chown root:root /home
sudo chown user:user /home/user -R
sudo chmod 755 /home
sudo chmod 755 /home/user
sudo chmod u+r /home/user -R
sudo chmod u+w /home/user -R

This insures that all your /home/user files have at least R and W for your username

When I type in
Code:

sudo chown user:user /home/user -R
I get the response
Code:

chown: cannot access `/home/user/.gvfs': Permission denied
When I type in either of
Code:

sudo chmod u+r /home/user -R
sudo chmod u+w /home/user -R

I get the response
Code:

chmod: cannot access `/home/user/.gvfs': Permission denied
So I typed in
Code:

ls -ld ~/.gvfs
which returned
Code:

dr-x------ 2 user user 0 2010-04-03 06:20 /home/user/.gvfs
Is this a problem?

Nautilus still not working...:cry:

10110111 04-03-2010 02:18 AM

Quote:

Code:
chown: cannot access `/home/user/.gvfs': Permission denied
This is OK. At least i have the same on my system, and nautilus works properly. Try the "BEST Troubleshooting solution" suggested by mreschke

widda 04-03-2010 04:35 AM

thanks mreschke, i'm so looking for things to try..my thread in here on video display size is a new try at an old stubborn problem, and in the process have searched for ways to change permissions, but failed so far.

widda 04-03-2010 04:52 AM

access `/home/x/.gvfs': Permission denied
-laptop:~$ sudo chmod u+r /home/d -R
chmod: cannot access `/home/xUh oh, back to square one like other guy/.gvfs': Permission denied
-laptop:~$


All times are GMT -5. The time now is 04:07 AM.