How to change file owner in AIX?
27,316
You need to run chown
as root.
Root means root: the user with user ID 0. If this rootuser
is a user who has the permission to run commands as root by using sudo
, that's not good enough. What rootuser
can do is to run sudo chown …
— the chown
command must be run by root, the rootuser
itself has no particular privileges.
Related videos on Youtube
Author by
jrara
Updated on September 18, 2022Comments
-
jrara almost 2 years
How can I change a owner of a file in AIX? I created a file using my personal account and then I tried to change user for this file:
chown rootuser myfile.csv chown: myfile.csv: Operation not permitted.
Then I changed to root user
sudo /usr/bin/su - rootuser
and tried to change the owner of this file
chown rootuser myfile.csv chown: myfile.csv: Not owner
How can I change the owner of this file?
-
Jeff Hewitt almost 11 yearsYou are not allowed to change the ownership of any file you own to another user: this opens up a can of worms in terms of security. As for
root
not being able to do that, this is really strange. By any chance, are you in a corporate environment where you authenticate with something like NIS/LDAP? Is this file local to your box or is it from a network-shared partition? What is the fileBill_Item_Tag_data.csv
? Ismyfile.csv
a symbolic link? -
dchirikov almost 11 yearsCould you add some outputs to your question? <pre>id rootuser</pre> and <pre>lsuser rootuser</pre>.
-
jrara almost 11 years@JosephR I edited my question.
-
Erik Aronesty about 9 yearstry sudo chown rootuser myfile.csv
-
-
jrara almost 11 yearsOk, I guess my rootuser is not really a root. Thanks a lot.