[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rm: cannot unlink `sendmail': Operation not permitted



try chattr -i /usr/sbin

Even if sendmail is set -i, if the directory is immutable you will not
be able to rm it.

Pete
-- 
http://www.elbnet.com
ELB Internet Services, Inc.
Web Design, Computer Consulting, Internet Hosting



Jason Lim wrote:
> 
> Hi all,
> 
> This is happening on a Redhat 7.2 system, but i think it would apply
> across all Linux distros.
> 
> [root@linux1 sbin]# pwd
> /usr/sbin
> [root@linux1 sbin]# chattr -iu sendmail
> [root@linux1 sbin]# rm sendmail
> rm: remove `sendmail'? y
> rm: cannot unlink `sendmail': Operation not permitted
> 
> [root@linux1 sbin]# ls -al sendmail
> -rwxr-xr-x   1 root     root        99161 May  1 01:21 sendmail
> 
> That is happening for all the files in that directory.
> 
> strace rm sendmail:
> 
> lstat64("sendmail", {st_mode=S_IFREG|0755, st_size=99161, ...}) = 0
> access("sendmail", W_OK)                = 0
> unlink("sendmail")                      = -1 EPERM (Operation not
> permitted)
> 
> Any ideas as to what may be happening?
> 
> Sincerely,
> Jason
> 
> --
> To UNSUBSCRIBE, email to debian-isp-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


-- 
To UNSUBSCRIBE, email to debian-isp-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: