Find the answer to your Linux question:
Results 1 to 5 of 5
This is driving me nuts. Code: httpadmin@mail:~$ ls -l total 56 drwxr-xr-x 2 root root 4096 Aug 14 22:11 apache2-default drwxr-xr-x 65 root root 4096 Aug 14 22:11 framework drwxr-xr-x ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2005
    Location
    Fresno, CA
    Posts
    5

    Can someone please explain this behavior?


    This is driving me nuts.

    Code:
    httpadmin@mail:~$ ls -l
    total 56
    drwxr-xr-x   2 root       root   4096 Aug 14 22:11 apache2-default
    drwxr-xr-x  65 root       root   4096 Aug 14 22:11 framework
    drwxr-xr-x  25 postmaster users  4096 Aug 16 09:37 horde
    drwxr-xr-x  26 root       root   4096 Aug 14 22:11 horde.bak
    drwxr-xr-x   2 root       root   4096 Aug 14 22:11 images
    -rw-r--r--   1 root       root   5258 Aug 14 22:11 index.html
    lrwxrwxrwx   1 root       root     21 Aug 15 17:52 phpmyadmin -> /usr/share/phpmyadmin
    lrwxrwxrwx   1 root       root     20 Aug 14 22:11 sqwebmail -> /usr/share/sqwebmail
    -rwxrwxrwx   1 httpadmin  users 17353 Aug 14 22:11 telegan.jpg
    -rw-r--r--   1 root       root   3996 Aug 14 22:11 telegan.png
    drwxr-xr-x   2 root       root   4096 Aug 14 22:11 webalizer
    httpadmin@mail:~$ rm telegan.jpg
    rm: cannot remove `telegan.jpg': Permission denied
    httpadmin@mail:~$
    My goal is to give the user httpadmin complete control over this entire directory except a few files. I set permissions on an example file: telegan.jpg to 777. and i even changed ownership to the user in question. Still I get permission denied. What am i doing wrong?

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2005
    Location
    Hell
    Posts
    514
    You need write permission on the parent directory to delete something.

  3. #3
    Just Joined!
    Join Date
    Jun 2005
    Location
    Fresno, CA
    Posts
    5

    Thanks to spoon!

    my frustration has been ended and im a little wiser.

  4. #4
    Linux Newbie
    Join Date
    Dec 2003
    Location
    Netherlands
    Posts
    193
    Strange, cause he has allready read/write access.
    Computers Are Like Air Conditioners... They\'re both useless with Windows open!

  5. #5
    Linux Enthusiast
    Join Date
    Aug 2005
    Location
    Hell
    Posts
    514
    Quote Originally Posted by Mystic_Slayer
    Strange, cause he has allready read/write access.
    No, to delete "~/telegan.jpg" he doesn't need any permissions to that file; rather he needs write permission to the directory that contains it (i.e. ~). (You're not modifying the file -- you're just unlinking it in the directory). The output he posted does not show the permissions on ~, but it appears that he did not have write permissions to it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •