If I mount the nfs manually and check with MC to the dir/files, user and >group are right, but mode is always 0777. It should be 0640 or 0644. Has >sombody an idea wats going wrong?
If I mount the nfs manually and check with MC to the dir/files, user and group are right, but mode is always 0777. It should be 0640 or 0644. Has sombody an idea wats going wrong?
Could it be the file system on the NAS which you don't mention?
Something that doesn't have the concept of permissions at all or they
aren't enabled?
On Tue, 6 Oct 2020 15:38:14 +0200, Hans-Werner Kneitinger
<hans-werner.kneitinger@gmx.de> declaimed the following:
If I mount the nfs manually and check with MC to the dir/files, user and >>group are right, but mode is always 0777. It should be 0640 or 0644. Has >>sombody an idea wats going wrong?
Is this applicable? https://linux.die.net/man/1/rsync
"""
-p, --perms preserve permissions
"""
One thing I have added recently is --numeric-ids option as I found that
while I keep all user uids equal across my system, some of the system
uids - those less than 1000 e.g. for various demon services etc - change depending on distro and version of distro it seems. So some of my backup
had their uids changed to match to same username on the NFS server. When
I copied back after a disk break I got a few niggles. I don't know why I thought it should have mapped back - but ... who knows. The --numeric-ids means I dont have to care how I put the files back.
Hallo,
I am running an RPi4 with latest RasbianOS. I want to do an backup some dirs/files on an Synology NAS via NFS nad rsync. It is working but mode attributes are not correct. User / Group are right.
from man entry...
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
It a bit baffling as I do almost exactly the same over nfs version 3.
But to another linux machine that I setup - not some NAS box.
One thing I have added recently is --numeric-ids option as I found that
while I keep all user uids equal across my system, some of the system
...
thought it should have mapped back - but ... who knows. The --numeric-ids means I dont have to care how I put the files back.
Could it be the file system on the NAS which you don't mention?
Something that doesn't have the concept of permissions at all or they
aren't enabled? Or permissions that don't map to Unix that well
especially when shared over NFS? Just guessing here. Maybe provide more
info?
On Tue, 06 Oct 2020 15:38:14 +0200, Hans-Werner Kneitinger wrote:...
Hallo,
I am running an RPi4 with latest RasbianOS. I want to do an backup some
dirs/files on an Synology NAS via NFS nad rsync. It is working but mode
attributes are not correct. User / Group are right.
Hmm.
I do something superficially similar:
3) When done, unmount the USB disk and store ot offline.
The rsync SSHD transfer may be a bit slower
So I guess the next question is, does this happen only with rsync or
other programs too if you copy files over?
The NAS HDDs are ext4. The NFS export settings are set via GUI.
Limited to Hosts, rw previleges, no squash, sync, previlegs ports only,
Users have access to dirs.
So I guess the next question is, does this happen only with rsync or
other programs too if you copy files over?
I always try and maintain the same UID and GID across systems on my
LAN for this reason, it makes things work more smoothly.
Am 07.10.20 um 09:43 schrieb Anssi Saari:
So I guess the next question is, does this happen only with rsync or
other programs too if you copy files over?
I am logging in as admin-user on the client. I mount te nfs manualy and started the Midnight Commander "MC" on the client. I could not change
the mode from 777 to anything else. Same when I am via WEBIN connectet
to the client.
mkdir -p /mnt/ds9_vmail/test -> same mode is 0777. Group:user root:root
and can be changed via chown to anthing eles.
touch /mnt/ds9_vmail/test/test.txt -> same as above.
Am 07.10.20 um 10:46 schrieb Chris Green:
I always try and maintain the same UID and GID across systems on my
LAN for this reason, it makes things work more smoothly.
It is not so easy.
No access on UIDs on the NAS.
Not every user on the Client has an account on the NAS.
But you're using NFS which means the NFS drive is mounted on the
system you're connecting from as if it's a local drive there has to be
some sort of strategy for handling UIDs and GIDs. What do you
expect/hope it will do?
Am 06.10.20 um 18:54 schrieb Jim Jackson:
One thing I have added recently is --numeric-ids option as I found that
while I keep all user uids equal across my system, some of the system
...
thought it should have mapped back - but ... who knows. The --numeric-ids
means I dont have to care how I put the files back.
Can you explain this a little mor how to do, please?
For me it things went wrong when backing a Raspberry Pi with rsync to a
SD card image file on another machine, where the id's for users and
system processes were different.
But the NAS doesn't know about those users and groups, and their
relationship to the backup user. To allow the backup user to access
those files, they have to be set to world readable and writeable
i.e. 777
Thank you for explanation but my use-case seems to be little different.
Its for backup/recovery only. No need for file sharing between clients,
all local only. The NAS is the central backup storage. No RPi user has
an account on the NAS. I think there is no need for and its better to
have less accounts as possible.
The RPis are data collectors or controllers. I have a backup-image from
every fresh setup and an RPi on cushion.
1. If an RPi or its SD Card dies, I restore from backup image and then restore latest data and setting from NAS.
2. If distro and/or hardware update is requiered, I do a fresh
installation and a data restore from NAS.
3. No RPi user has access to the NAS but the special backup user.
On 08/10/2020 07:23, Hans-Werner Kneitinger wrote:
Thank you for explanation but my use-case seems to be little different.
Its for backup/recovery only. No need for file sharing between clients,
all local only. The NAS is the central backup storage. No RPi user has
an account on the NAS. I think there is no need for and its better to
have less accounts as possible.
The RPis are data collectors or controllers. I have a backup-image from
every fresh setup and an RPi on cushion.
1. If an RPi or its SD Card dies, I restore from backup image and then
restore latest data and setting from NAS.
2. If distro and/or hardware update is requiered, I do a fresh
installation and a data restore from NAS.
3. No RPi user has access to the NAS but the special backup user.
That's probably your problem. You backup user is writing files which
have various Pi user and group id's to the NAS, and the NAS stores those
ids, as otherwise every file would belong to the backup user, which
isn't what you want.
But the NAS doesn't know about those users and groups, and their
relationship to the backup user. To allow the backup user to access
those files, they have to be set to world readable and writeable
i.e. 777
If you created matching users and groups on the NAS, and made sure the
backup user was part of those groups, the NAS would then know who was
allowed to access what, and the file permissions could then also be
stored correctly.
This is my interpretation of how NFS works, I may be wrong.
---druck
My NFS always spreads UIDS, GIDS and permissions *exactly*,
The Natural Philosopher wrote:
My NFS always spreads UIDS, GIDS and permissions *exactly*,
But how well does it handle "so-called posix" ACLs?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 218:35:00 |
Calls: | 6,621 |
Calls today: | 3 |
Files: | 12,171 |
Messages: | 5,317,787 |