Why can't I rename this file?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > Why can't I rename this file?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Why can't I rename this file?  
Dan


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-13-04 05:52 PM

Why can't I rename this file under my normal login?

$ pwd
/var/tmp
$ ls -ld
drwxrwxrwt   3 bin      bin           83456 May 13 11:51 .
$ ls -l ar.exp
-rw-rw-rw-   1 root     system      2150739 May 12 23:22 ar.exp
$ mv ar.exp art.exp
mv: 0653-401 Cannot rename ar.exp to art.exp:
Operation not permitted.

TIA,
Dan





[ Post a follow-up to this message ]



    Re: Why can't I rename this file?  
phn@icke-reklam.ipsec.nu


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-13-04 06:40 PM

Dan <dan@nospam.com> wrote:
> Why can't I rename this file under my normal login?

> $ pwd
> /var/tmp
> $ ls -ld
> drwxrwxrwt   3 bin      bin           83456 May 13 11:51 .
> $ ls -l ar.exp
> -rw-rw-rw-   1 root     system      2150739 May 12 23:22 ar.exp
> $ mv ar.exp art.exp
> mv: 0653-401 Cannot rename ar.exp to art.exp:
>               Operation not permitted.

Note the 't' bit on the directory. From the manpage (FreeBSD) :
1000    (the sticky bit) When set on a directory, unprivileged
users can delete and rename only those files in the direc_
tory that are owned by them, regardless of the permissions
on the directory.  Under FreeBSD, the sticky bit is ignored
for executable files and may only be set for directories
(see sticky(8)).


AIX is strange, but in this respect unix-compatible.

> TIA,
> Dan

--
Peter Håkanson
IPSec  Sverige      ( At Gothenburg Riverside )
Sorry about my e-mail address, but i'm trying to keep spam out,
remove "icke-reklam" if you feel for mailing me. Thanx.





[ Post a follow-up to this message ]



    Re: Why can't I rename this file?  
Barry Margolin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-13-04 06:40 PM

In article <CLNoc.34$pe4.49155@news.uswest.net>, Dan <dan@nospam.com>
wrote:

> Why can't I rename this file under my normal login?
>
> $ pwd
> /var/tmp
> $ ls -ld
> drwxrwxrwt   3 bin      bin           83456 May 13 11:51 .
> $ ls -l ar.exp
> -rw-rw-rw-   1 root     system      2150739 May 12 23:22 ar.exp
> $ mv ar.exp art.exp
> mv: 0653-401 Cannot rename ar.exp to art.exp:
>               Operation not permitted.

The directory's sticky bit is set.  Only the owner of a file or the
owner of the directory may remove or rename the file.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:43 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register