FN-GM Posted February 26, 2023 Posted February 26, 2023 (edited) Hello, I am trying to copy data from an Ubuntu machine onto a Synology NAS. I have setup Rsync to do this. However, the permissions on the files when they are copied destination (Synology NAS) aren't correct. Folders that have been created are ok. I would like the permissions to be inherited from the parent folder on the NAS. However, whatever I seem to do they are in some way not correct. I am using this command. sudo rsync -rtvm --perms -p --prune-empty-dirs --remove-source-files "/Test/" [email protected]:'"/volume1/dir/Test/"' I have also used sudo rsync -rtvm --no-perms --prune-empty-dirs --remove-source-files "/Test/" [email protected]:'"/volume1/dir/Test/"' sudo rsync -rtvm --chmod=ugo=rwX --prune-empty-dirs --remove-source-files "/Test/" [email protected]:'"/volume1/dir/Test/"' sudo rsync -rtAvm --chmod=ugo=rwX --prune-empty-dirs --remove-source-files "/Test/" [email protected]:'"/volume1/dir/Test/"' Can someone help me crack this please? Thanks Edited February 26, 2023 by FN-GM
dmj Posted March 4, 2023 Posted March 4, 2023 (edited) -p should do it. Are you having trouble with POSIX permissions or ACL's. If the latter, does the filesystem have acl support enabled? Where do the permissions come from? Ie are the user accounts mapped correctly in the target system? Edited March 4, 2023 by dmj
FN-GM Posted March 4, 2023 Author Posted March 4, 2023 -p doesn't work either. I am not sure what type of permissions Synology uses. When you say mapped correctly, how do you mean please?
dmj Posted March 5, 2023 Posted March 5, 2023 I don't know/understand what synology is, so I suspect it's some sort of *nix. Given that assumption can you say whether you using a centralised system for managing your users? - you won't be able to match users on different systems unless the user uid's match. it would be helpful if you post the results of ls -l and (if there is a '+' at then d of the line, indicatiing an ACL run: getfacl on bothfilesystems.
FN-GM Posted March 5, 2023 Author Posted March 5, 2023 I don't know/understand what synology is, so I suspect it's some sort of *nix. Given that assumption can you say whether you using a centralised system for managing your users? - you won't be able to match users on different systems unless the user uid's match. it would be helpful if you post the results of ls -l and (if there is a '+' at then d of the line, indicatiing an ACL run: getfacl on bothfilesystems. Synology is my 4 bay NAS. We aren’t using a centralised system from users. This is actually a home setup. I will run those commands when I get back home. To be honest, I didn’t expect this to me such a complex issue. I assumed it would inherit the permissions on the destination folder like it would in Windows. I am not a huge Linux expert so thanks for your patience.
dmj Posted March 5, 2023 Posted March 5, 2023 No worries. Windows wouldn't copy the permissions unless the same user existed on both systems and I suspect this is the issue here - or rather the user ID's on both systems don't match. if the users match with 'ls -l' (in the directory), run 'id ' and make sure the UID matches on both systems. Unix systems have the root user as UID=0 and the first user usually has an UID=1001, or 501 on macs. The UID's on both systems will need to match.
FN-GM Posted March 5, 2023 Author Posted March 5, 2023 No worries. Windows wouldn't copy the permissions unless the same user existed on both systems and I suspect this is the issue here That's my intended outcome. I don't want it to touch the permissions at all. I don't want them to match the source. Sorry I didn't get chance to run the commands. There was power outage at work that I had to attend to. Just got home and off to bed. I will report back shortly. Shall I send the results via PM as they may contain names? Thanks
FN-GM Posted March 10, 2023 Author Posted March 10, 2023 Hello, Sory about the delay. I ran the commands on both systems. I get output from my Ubuntu box but the Synology not so much so.... user@NAS:~$ ls -l total 0 user@NAS:~$ getfacl -sh: getfacl: command not found I can PM the Ubuntu output if you like? Thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now