jfranco
(Jean Franco)
February 28, 2025, 11:10am
1
Hi all,
I’m moving files from an old Freenas and using rsync.
The thing is that it’s transfering and carrying the permissions from the freenas.
When I go to the Set Permissions on the GUI it replies:
File "/home/samba1/.config/actions/reset-share-acls/50reset_share_acls", line 34, in <module>
phelper.check_returncode()
File "/usr/lib64/python3.11/subprocess.py", line 502, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '('podman', 'exec', 'samba-dc', 'samba-reset-acls', '-g', 'rh', '-p', 'ergrw', 'rh')' returned non-zero exit status 1.
mrmarkuz
(Markus Neuberger)
February 28, 2025, 11:53pm
2
You could reset file owner and group to the samba instance user.
In this example the owner/group for share sambashare
and its content in samba instance samba1
are set to the samba instance user samba1
:
chown -R samba1:samba1 /home/samba1/.local/share/containers/storage/volumes/shares/_data/sambashare
Now set permissions from the UI should work to make the shares accessible.
2 Likes
jfranco
(Jean Franco)
March 3, 2025, 6:19pm
3
Still no dice, I get the same reply above.
From the log it says:
module/samba1/reset-share-acls
Task ID: Copy to clipboard0650822b-d5a2-4a40-9ae4-232a754bae09
<7>podman exec samba-dc samba-reset-acls -g share -p grw share
find: ‘share/othershare’: Permission denied
…
Traceback (most recent call last):
File “/home/samba1/.config/actions/reset-share-acls/50reset_share_acls”, line 34, in
phelper.check_returncode()
File “/usr/lib64/python3.11/subprocess.py”, line 502, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout.
mrmarkuz
(Markus Neuberger)
March 3, 2025, 6:46pm
4
Could you please share the result of following commands to show the owner/permissions.
Check the dir where the shares are located:
runagent -m samba1 podman exec samba-dc ls -l /srv/shares
Check the share:
runagent -m samba1 podman exec samba-dc ls -l /srv/shares/share
jfranco
(Jean Franco)
March 3, 2025, 7:39pm
5
[root@ibm _data]# runagent -m samba1 podman exec samba-dc ls -l /srv/shares
total 716
drwxrwxr-x. 7 root users 462848 Feb 28 14:16 check-list
drwxrwxr-x. 3 root users 27 Feb 26 17:18 docs
[root@ibm _data]# runagent -m samba1 podman exec samba-dc ls -l /srv/shares/docs
ls: cannot access '/srv/shares/docs/ATA DE REUNI'$'\303\203\302\203''O 16-03-20.docx': Permission denied
total 88
-?????????? ? ? ? ? ? 5W2H - Webinar.xlsx
drwxrws---. 2 root root 66 Mar 3 17:47 Photos
jfranco
(Jean Franco)
March 3, 2025, 7:41pm
6
@mrmarkuz
This is after I chown -R samba1:samba1 folder
Thanks,
mrmarkuz
(Markus Neuberger)
March 3, 2025, 9:42pm
7
Owner, group and permissions are correctly set on the share so it seems resetting the rights worked until it hits “permission denied”.
This file name could lead to issues. Please rename it to remove the special characters.
Just the filename is shown, this can be the case when permissions are missing.
Let’s check again as root:
ls -l /home/samba1/.local/share/containers/storage/volumes/shares/_data/docs
jfranco
(Jean Franco)
March 4, 2025, 1:47pm
8
Hi Markuz,
drwxrwxr-x. 2 samba1 362243 6 Feb 26 14:18 test
This happens even if I rename it removing the special characters.
Thanks,
[EDIT] I tought it was an issue with the folders only, but I was wrong.
jfranco
(Jean Franco)
March 4, 2025, 1:54pm
9
I went further and it’s something that happens if you SCP the files to the server and try to chown / set the permissions by the GUI.
I tried to chown -R samba1:samba1 and samba1:362243 which is the user the GUI sets ownership to the files and I get the same error.
When I run:
runagent -m samba1 podman exec samba-dc ls -l /srv/shares/docs
ls: cannot access ‘/srv/shares/docs/CONVITE.pdf’: Permission denied
Thanks,
mrmarkuz
(Markus Neuberger)
March 4, 2025, 2:05pm
10
Just to clarify: In the container it’s root:users which is the same as samba1:362243 on the host.
I’ll try to reproduce and report…
mrmarkuz
(Markus Neuberger)
March 4, 2025, 9:04pm
11
When uploading the files via SCP I get the same error when setting permissions but after chown -R samba1:samba1 … as root, it’s working.
Set the owner to the same one of the share: (root:users)
chown -R --reference=/home/samba1/.local/share/containers/storage/volumes/shares/_data/share /home/samba1/.local/share/containers/storage/volumes/shares/_data/share
Maybe you need to also reset the permissions:
For directories:
find /home/samba1/.local/share/containers/storage/volumes/shares/_data/share -type d -exec chmod 775 {} \;
For the files:
find /home/samba1/.local/share/containers/storage/volumes/shares/_data/share -type f -exec chmod 664 {} \;
Now setting permissions via UI should hopefully work again.
1 Like
jfranco
(Jean Franco)
March 4, 2025, 10:02pm
12
Hi @mrmarkuz ,
I lost access testing The second drive
I’ll probably have to edit the fstab to bring back up, which I’ll be doing tomorrow.
It’s a real server and not a VM
Thanks,
jfranco
(Jean Franco)
March 6, 2025, 12:12pm
13
Hi @mrmarkuz ,
Still does not work unfortunately!
I tried setting via chown and exec as you posted above, without success!
The name of the folders does not make a difference.
Thanks,
1 Like
mrmarkuz
(Markus Neuberger)
March 7, 2025, 8:13am
14
I still can’t reproduce even if I scp from my xigmanas to the NS8 or from a Windows system via WinSCP it’s enough to just execute
chown -R --reference=/home/samba1/.local/share/containers/storage/volumes/shares/_data/share /home/samba1/.local/share/containers/storage/volumes/shares/_data/share
to be able to reset the permissions from the UI.
Do you use Rocky or Debian for the NS8?
How do you upload the files? Could you share the commands?
jfranco
(Jean Franco)
March 7, 2025, 10:40pm
15
Hi Mr. Markuz,
I use Rocky.
I use SCP
tar -cpvzf files.tar.gz files
scp files.tar.gz root@NS8:
Thanks,
1 Like
mrmarkuz
(Markus Neuberger)
March 7, 2025, 11:10pm
16
Does it work without the -p option which preserves the permissions?
tar -cvzf files.tar.gz files
Of course owner and permissions need to be changed after extracting as explained.
How do you extract the files to the share directory on the NS8?