How to change the ownership of a directory ?
I have been dealing with ACLs and stuck with this problem. I have a directory which is copied from user machine to the Uinx server. So, the user is the owner of the directory. Now, in order to compile the files, I have to change the ownership of this directory to the admin account and also inherit the permissions to the subdirectories.
Tried with Code:
chown -R user:group ../path |
Quote:
|
Permission denied
Quote:
|
admin as in root?
there are a few things that can prevent even root from modifying a file. on linux, that is. i know nothing of solaris. e.g. it could have the immutable attribute set, can be changed with 'chattr -i' iirc. also, what are the actual ownership & permission of the file right now, and is "the admin" uid=0? |
|
Quote:
|
Solaris, try logging in su in your terminal anyways, then run the commands.
|
Quote:
Did you set ACLs? Do you see ACLs? Quote:
What is the target machine Solaris version and file system ? How was the directory copied? Quote:
Quote:
Under what account do you run the failing "chmod" command? |
My apologies for not providing the detailed information thought that the provided information was sufficient. Please find the details below:
Quote:
ACLs supposed to be inherited from the top-level directory to the newly copied directory.(This could be an issue). Yes, I see the ACLs. Code:
drwx---rwx+ 2 rp033 EEGX_CEG 1024 Dec 27 01:16 R_code_gen/ Quote:
Quote:
and the directory is being copied from a Windows OS. |
Quote:
Quote:
And this is another good thing to put in a problem...using Windows adds things into the equation, and the "admin" account now actually makes sense. So have you tried copying the directory on the Solaris box itself, and not through Windows? Tried changing the ownership to something that works with the Windows system? You omit things again, such as the use of Samba (is it being use here?), or how Windows is attached to this Solaris system, or what your actual goals are. What are you trying to do? Because it doesn't sound like you're having a problem with ACL's, but rather with Windows. |
You still missed to answer to three of my questions:
- What is the source machine OS and file system ? (You just stated Windows.) - What is the target machine Solaris version and file system ? (I'm assuming Solaris 11.x) - How was the directory copied? In any case, the behavior you complain of is expected. By default and for security reasons, an unprivileged Solaris user cannot give away ownership of a file or a directory. There are various ways to change this:
|
All times are GMT -5. The time now is 11:25 PM. |