AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  Directory / File Permissions and File Deletion

    Posted Fri September 23, 2011 05:15 PM

    Originally posted by: SystemAdmin


    I don't know why in AIX, this restriction is imposed whereas the same will not be a problem on Linux environment.

    Here is the scenario
    ====================

    oracle@servername:/tmp/tt/t/test$ ls -ld $PWD
    drwxr-xr-x 2 oracle dba 256 Sep 23 13:57 /tmp/tt/t/test

    oracle@servername:/tmp/tt/t/test$ ls -lt
    total 8
    -rw-rw-r-- 1 user staff 1881 Sep 23 13:57 te.txt
    QUESTION Can the "user" delete the file "te.txt"?


  • 2.  Re: Directory / File Permissions and File Deletion

    Posted Sat September 24, 2011 03:55 PM

    Originally posted by: SystemAdmin


    user cannot delete file from folder /tmp/tt/t/test, because
    he has no write permissions for this folder. Wats wrong here?
    In linux user cannot delete file from folder if he has no write permissions on folder.


  • 3.  Re: Directory / File Permissions and File Deletion

    Posted Sat September 24, 2011 08:28 PM

    Originally posted by: Kosala


    Apparently Linux does not allow this either, at least on my kernel "Linux x201 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64 GNU/Linux". This is on a ext4 FS.

    kosala@x201:/tmp/test $
    ls -la
    total 8
    drwxr-xr-x 2 oracle oracle 4096 Sep 25 05:49 .
    drwxrwxrwt 15 root root 4096 Sep 25 05:47 ..
    -rw------- 1 kosala kosala 0 Sep 25 05:49 test.txt

    kosala@x201:/tmp/test $
    rm test.txt
    rm: remove regular empty file `test.txt'? y
    rm: cannot remove `test.txt': Permission denied


  • 4.  Re: Directory / File Permissions and File Deletion

    Posted Sun September 25, 2011 11:02 PM

    Originally posted by: esv


    > SeshaSugav wrote:
    > I don't know why in AIX, this restriction is imposed whereas the same will not be a problem on Linux environment.
    >
    > Here is the scenario
    > ====================
    >
    > oracle@servername:/tmp/tt/t/test$ ls -ld $PWD
    > drwxr-xr-x 2 oracle dba 256 Sep 23 13:57 /tmp/tt/t/test
    >
    > oracle@servername:/tmp/tt/t/test$ ls -lt
    > total 8
    > -rw-rw-r-- 1 user staff 1881 Sep 23 13:57 te.txt
    >
    >
    > QUESTION Can the "user" delete the file "te.txt"?

    the answer again is no, if Linux allows it, then Linux is implementing wrong the file access bit definitions, "user" should at most be allowed to modify the contents of file te.txt but nothing more.
    best regards,
    enrique sanchez.