This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Permissions mess-up for SMB

CIFS/SMB network sharing.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
zinneken
Starter
Starter
Posts: 57
Joined: 19 Jul 2013 11:07
Status: Offline

Permissions mess-up for SMB

Post by zinneken »

Every time I copy files from my linux machine to nas4free over smb it does so with permissions -rw-------

This makes the files unusable under AFP mode. I have to manually change the permissions of SMB copied files to -rwxrwxrwx in order for them to be usable under AFP.

I tried both with and without the "Enable permission inheritance" under the smb share, but this has no effect on the file permissions.

How can copy to nas4free over SMB ensuring file permissions of the copied files is -rwxrwxrwx ?
NAS4Free-x64-LiveUSB-9.2.0.1.972
P8H61-M LX R2.0 with onboard Realtek 8111E/8111F, G1610 2.6GHz, 2*4GB RAM Non-ECC CMV4GX3M1A1333C9, ASMedia ASM1061 AHCI
2*2TB WD20EZRX-00DC0B0 RAID1, 1*2TB SAMSUNG HD204UI, 1*2TB WD20EZRX-00DC0B0, 1*1TB SAMSUNG HD103SI, 1*250GB Hitachi HTS545025B9SA02
2* internal USB 2 drives

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Permissions mess-up for SMB

Post by alexey123 »

zinneken wrote:Every time I copy files from my linux machine to nas4free over smb it does so with permissions -rw-------
If you linux user, You must know about owner. Permissions is not all. Who is owner your files on nas4free smb share? May be ftp? :roll:
How can copy to nas4free over SMB ensuring file permissions of the copied files is -rwxrwxrwx ?
for do this use user-level auth.
On your linux machine create custom group:user some as nas4free.
Add automount smb share to your linux computer and use this location for store files.
Inherit windows permissions not need
Update
Why you need executable on NAS4Free permissions on server :?
Last edited by alexey123 on 13 Sep 2013 13:08, edited 1 time in total.
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Permissions mess-up for SMB

Post by raulfg3 »

try NFS is unix protocol and have better management of unix permission.

PD: or disable inherit permission on Shares Add/Edit http://wiki.nas4free.org/doku.php?id=do ... smb_shares

and add to auxiliary parameter "create mask = 000"

https://lists.samba.org/archive/samba/2 ... 63429.html
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Permissions mess-up for SMB

Post by alexey123 »

raulfg3 wrote:and add to auxiliary parameter "create mask = 000"
I not agree
I use "create mask = 664" and "directory mask = 0775" on my server. It work some years - files have permissions 664 and folders have 775.
I have 2 windows and 2 ubuntu clients
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Permissions mess-up for SMB

Post by raulfg3 »

sorry you are right .
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

zinneken
Starter
Starter
Posts: 57
Joined: 19 Jul 2013 11:07
Status: Offline

Re: Permissions mess-up for SMB

Post by zinneken »

I'm a noob at linux and permissions.
I see that everything I copy through AFP has permissions -rwxrwxrwx and that these files do not give me any problems.
I see that everything I copy through SMB has permissions -rw------- and that these files do give me problems.

I'll read through your suggestions (thanks!) and revert how I got on!
NAS4Free-x64-LiveUSB-9.2.0.1.972
P8H61-M LX R2.0 with onboard Realtek 8111E/8111F, G1610 2.6GHz, 2*4GB RAM Non-ECC CMV4GX3M1A1333C9, ASMedia ASM1061 AHCI
2*2TB WD20EZRX-00DC0B0 RAID1, 1*2TB SAMSUNG HD204UI, 1*2TB WD20EZRX-00DC0B0, 1*1TB SAMSUNG HD103SI, 1*250GB Hitachi HTS545025B9SA02
2* internal USB 2 drives

zinneken
Starter
Starter
Posts: 57
Joined: 19 Jul 2013 11:07
Status: Offline

Re: Permissions mess-up for SMB

Post by zinneken »

I first tried create mask = 777 since that is what I seem to need to have the files usable between SMB and AFP across users. This didn't help, permissions stayed -rw-------
Searching some more I found out about force create mode, so I used force create mode = 777 in the auxiliary parameter field.

I still get a linux error copying from SMB to nas4free, saying linux is unable to keep permissions. However, on nas4free permissions for files copied from linux over smb are now -rwxrwxrwx which is what I needed in the first place.

Thanks for your help in finding this solution!
NAS4Free-x64-LiveUSB-9.2.0.1.972
P8H61-M LX R2.0 with onboard Realtek 8111E/8111F, G1610 2.6GHz, 2*4GB RAM Non-ECC CMV4GX3M1A1333C9, ASMedia ASM1061 AHCI
2*2TB WD20EZRX-00DC0B0 RAID1, 1*2TB SAMSUNG HD204UI, 1*2TB WD20EZRX-00DC0B0, 1*1TB SAMSUNG HD103SI, 1*250GB Hitachi HTS545025B9SA02
2* internal USB 2 drives

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Permissions mess-up for SMB

Post by alexey123 »

zinneken, what linux you use?
In all case check ownership for your samba share.
For do it connect over SSH as root ( check Permit root login checkbox on Services|SSH tab )
For linux type on terminal

Code: Select all

ssh <your_nas_ip> -l root

Code: Select all

cd /mnt/<your_disk>/<your smb share>

Code: Select all

ls -l
need be some as
ls -l
total 40
drwxrwxrwx+ 2 alexey wheel 512 Sep 11 07:58 alexey
-rwxrwxrw-+ 1 alexey wheel 12 Sep 11 08:04 alexey.txt
-rwxrw-rw- 1 alexey wheel 6 Sep 9 09:45 text.txt
drwxrwxrwx+ 2 user1 wheel 512 Sep 11 08:04 user1
-rwxrwxrw-+ 1 user1 wheel 3 Sep 11 08:07 user1.txt
I marked as permissions owner group
May be your files owned by ftp user?
It say about using anonymous access, not good solution for MAC and Linux.

Also, please not use 777 permissions for your shared files, you not need make executable on server files on your share. Please use 666 for files.
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

ptpstudio
Starter
Starter
Posts: 57
Joined: 15 Apr 2014 07:01
Location: Czech Republic
Status: Offline

Re: Permissions mess-up for SMB

Post by ptpstudio »

alexey123 wrote: zinneken, what linux you use?
In all case check ownership for your samba share.
For do it connect over SSH as root ( check Permit root login checkbox on Services|SSH tab )
For linux type on terminal

Code: Select all

ssh <your_nas_ip> -l root

Code: Select all

cd /mnt/<your_disk>/<your smb share>

Code: Select all

ls -l
need be some as
ls -l
total 40
drwxrwxrwx+ 2 alexey wheel 512 Sep 11 07:58 alexey
-rwxrwxrw-+ 1 alexey wheel 12 Sep 11 08:04 alexey.txt
-rwxrw-rw- 1 alexey wheel 6 Sep 9 09:45 text.txt
drwxrwxrwx+ 2 user1 wheel 512 Sep 11 08:04 user1
-rwxrwxrw-+ 1 user1 wheel 3 Sep 11 08:07 user1.txt
I marked as permissions owner group
May be your files owned by ftp user?
It say about using anonymous access, not good solution for MAC and Linux.

Also, please not use 777 permissions for your shared files, you not need make executable on server files on your share. Please use 666 for files.
Im new user for nas4free. Ihave problém with files permisions I use only FTP only 1 admin account who upload files rest users use anonymous login and I need them to be able copy files. But always whatever I upload there is restricted permisions so they cant download those files.How can change for public can R X files by default after I upload them?

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Permissions mess-up for SMB

Post by raulfg3 »

Change mask to 0000 in ftp GUI options.
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

Post Reply

Return to “CIFS/SMB (Samba)”