Access Denied

Printed from http://www.compatdb.org/support/topics/162157_access_denied.html

Access Denied - 05/12/05 08:51 PM

shocked How do I stop getting "Access Denied" messages when I try to change anything? I have been attempting to change my wallpaper by pasting a jpeg file into /usr/share/wallpapers/. I keep getting "Access Denied, can not write to directory." I tried signing in as root, changing to security level 1, changing permissions. Result: OS crashed, I have to do another complete re-install. I had a similar problem when I was trying to add a new printer driver. Any suggestions?

Re: Access Denied - 05/13/05 11:25 AM

...and what distro are you using? What GUI, KDE or Gnome?

Re: Access Denied - 05/13/05 07:19 PM

I'm using Mandrake 10.1 with KDE. I have downloaded all the updates & bug fixes.

Re: Access Denied - 05/13/05 10:39 PM

maybe (as root) try:
$ touch > /.forcefsck
$ shutdown -r now

??

(that's from memory - it -is- .forcefsck isn't it?)

isn't there also an lsattr command so you can check for any extended permissions
in /usr/share/wallpapers ?

Re: Access Denied - 05/15/05 12:26 AM

su
enter root password
chmod -c 777 /usr/share

Re: Access Denied - 05/20/05 06:16 AM

danleff,

Thanks for your suggestion. It didn't quite work - I kept getting a "not enough arguments" message. However, after some trial and error I evolved to the following Konsole command: chmod ugoa+rw 777 usr/share/wallpapers. Even with that, I got a strange error message, "No such directory as 777." However, it still worked & I am finally able to write to my file. Thanks again.

Re: Access Denied - 05/20/05 05:07 PM

Look at your syntax. I think it should have been;

chmod ugoa+rw /usr/share/wallpapers

No need for 777 when using direct characters to set permissions - chmod thought it was a file.

chmod ugoa+rw <name-of-file>

or;

chmod ugoa+rw <directory>

Also, did you leave off the / before usr?

Re: Access Denied - 05/20/05 08:14 PM

Can't you also add yourself to the Sudoers list in /etc/sudoers and add the following line at the end (and of course you have to edit this file as root):

<username> ALL=NOPASSWD

This way it won't ever ask you for the root password again, but I think you can also do it for that specific folder or file as well if you are worried about your security:

<username> ALL=NOPASSWD: /usr/share/wallpapers/