Web Hosting Talk







View Full Version : How to change file access permission?


Pluto
11-19-2001, 10:32 PM
I am not talking about chmod here. I need to change certain file or directory from root access to client's access.

Eg:
rwxr-xr-x 2 root root 12288 Nov 16 16:51 clientID/

change it to

rwxr-xr-x 2 userID userID 12288 Nov 16 16:51 clientID/

Currently my box is powered by redhat7.1.

Thanks in advance.

The Prohacker
11-19-2001, 10:55 PM
chown userid.groupid filename


Mind you, this is Changing ownership, not changing permissions....

Synergy
11-20-2001, 01:39 AM
.

bobcares
11-27-2001, 07:13 AM
Actually it would go like
chown userid:groupid filename
chown userid:groupid directory -R
for recursively changing the entire ownership of a directory.

You could even use chown as

chown userid filename
Then use chgrp - change group as
chgrp groupid filename

Have a great day :)

Regards
Amar