Operating System - HP-UX
1836378 Members
2462 Online
110100 Solutions
New Discussion

copy files to CIFS share and maintain ACLs

 
dev44
Regular Advisor

copy files to CIFS share and maintain ACLs

Hi,

Is there a way to copy files from various systems (linux, Windows, HP-UX) to a CIFS share on an HP-UX system and maintain the original uid/gid and permissions? When I copy a file there now, even using "cp -p" the uid gets changed to my id but I want it to keep the original id. We are using active directory.

Thanks,
whatever
1 REPLY 1
TwoProc
Honored Contributor

Re: copy files to CIFS share and maintain ACLs

I don't think so, moving things from a Windows environment to a Unix (or vice-versa) is usually troublesome. You'd have to have whatever process that is reading the file on the Unix side be able to fix the permissions before it reads them. To make sure that that file is correctly owned when it is received - make the group of the parent directory where the file is placed correct for what you want the file's group ownership to be, then add a "chmod g+s" command for the directory. This will force all files in the directory to have the correct group ownership when the file is dropped in the CIFS/Samba share from the Windows machine.

I've no experience in forcing perms from Linux using CIFS ( I don't use Windows compatibility tools to go Unix to Unix). BUT, it should work relatively the same - use the "+s" switch on the directory to force all files created in that directory to be owned by the group that you need.
We are the people our parents warned us about --Jimmy Buffett