preserve the ownership
After the user zip the file , then the owner of the zip file will be changed , how to preserve the owership ? thx
host//tmp> ll abc.prn -rwxrwxrwx userA abc.prn host//tmp> whoami host//tmp> userB host//tmp> gzip abc.prn gzip: abc.prn: Operation not permitted host//tmp> ll abc.prn* host//tmp> -rwxrwxrwx userA abc.prn -rwxrwxrwx userB abc.prn.gz How to let the owner of the file "abc.prn.gz" is userA (except change it by root) ? thx |
change it with
Code:
chown userA.userA filename |
I can do it at UNIX , but fail in Linux , the error is "chown: changing ownership of `./abc.prn': Operation not permitted" , all users is the same result, can suggest how to make it? thx.
|
Does userB have permission to write to the directory where the file is?
|
Yes , the path is released to all users, the mode is 666 .
|
you need to be root
|
All times are GMT -5. The time now is 07:50 AM. |