I have been learning Linux from few days, and now I am at File Parmissions with sticky bits, I tried the following:
[root@localhost sdcdir]# ll
total 24
drwx------. 2 root root 16384 Mar 21 21:38 lost+found
drwxrws--T. 2 root g1 4096 Mar 23 01:22 testdir
g1 is the group that has Pavan, Sudheer and Surendra as members and Surendra is the group administrator (i.e. gpasswd -A Surendra)
Now, Pavan create a file p1 in testdir:
[Pavan@localhost testdir]$ touch f1
[Pavan@localhost testdir]$ ll
total 0
-rw-rw-r--. 1 Pavan g1 0 Mar 23 01:33 f1
[Pavan@localhost testdir]$
When I am trying to delete it with Surendra Account I am getting error:
[Surendra@localhost sdcdir]$ cd testdir/
[Surendra@localhost testdir]$ ll
total 0
-rw-rw-r--. 1 Pavan g1 0 Mar 23 01:33 f1
[Surendra@localhost testdir]$ rm f1
rm: cannot remove `f1': Operation not permitted
[Surendra@localhost testdir]$
File f1 has g1 as groupowner yet file is not being able to be deleted except by Pavan himself. When setgid, group is set the owner, why cant any member of group delete the file?