Although I prefer the Samba "force group", "force create mode", and "force directory mode" combination, that approach is effectively obsolete (or at least too much trouble) starting with OS X Lion. Right now, the best solution is to use groups and ACLs.
In System Preferences -> Users & Groups:
- Create a new group for the users who need write access to the file share. Do not try to reuse the "staff" group, a new group is required to force ACLs to be created in step 4.
- Add the users to the group.
In System Preferences -> Sharing -> File Sharing:
- Select the shared folder.
- Add the group to the share permissions (click the + under the "Users" list) and give it read/write access.
Check the ACLs on the shared directory and its contents using 'ls -le'. You should see something like this:
-rw-r-----+ 1 scott staff 43667456 Feb 17 21:59 filename
0: group:xxx inherited allow read,write,execute,append,...
The permissions are inherited; all group members now have r/w access.
Answer from user1241759 on Stack Exchangemacos - Permissions issue when copying files over SMB to server on OS X 10.9 Mavericks - Ask Different
macos - Cannot write to SMB Share with Terminal OS X 10.8 - Ask Different
Write permission denied for SMB share - General Support - Unraid
Permission errors within an app af… | Apple Developer Forums
Sorry this doesn't help the OP, but I can confirm that
unix extensions = no
worked for me. I have Macs running Snow Leopard connecting to Linux (lenny/sid) server with Samba 3.2.3. I am posting this so people will still try that. Much like others, before I put the unix extensions = no line in, the force create mode was being ignored.
Samba has two ways of setting perms for an uploaded file:
- Without UNIX extensions: preset file/directory mask is used
- With UNIX extensions (which probably MacOS client has): that allows clients to control file perms
Here's the lines you should add to config file (smb.conf):
# For case 1: no UNIX extensions create mask = 0644 directory mask = 0755 # For case 2: override UNIX extensions force create mode = 0644 force directory mode = 0755
(Should be placed BEFORE any share definition goes: this looks like [share name] in square braces and a couple of indented lines. These sets will then apply to all shares you have)
Also read about force group and force user in man smb.conf, if you need it.
for what it is worth, I couldn't access my samba share, maybe you have forgotten to add you username to the samba password group (for lack of beter description phrase)
this is what I did to get mine to work
smbpasswd -a username
after by using nautilus, shared my drive/folder with right-click, sharing, etc.
create your password, and use your username and passsword (which you just entered) to access your samba drive, you can also map this drive in Windows
hope this could help
Are the group and owner of the shared folder set properly for the samba user? Should be the same, or try
$ chown -R nobody:nogroup sharedfolder
for testing purposes...
Usually the authentication prompt is in relation to the destination for your copy.
Thus, from what you're describing, you should enter your Gentoo login credentials. However, I suspect the owner/write permission are too restrictive on that specific volume. Have you checked owner user/group on the problematic volume vs. the other "problem-free" volumes? Are the read/write permissions the same?
To change the permissions without resorting to Terminal, highlight the folder you want to put the user file in and select Get Info (Cmd+i). At the bottom are the permissions. Make sure that where it says "everyone" that it also says "Read & Write." You may have to click the little gold lock at the bottom of the Get Info pane to adjust this. Once you do this, you will be able to copy your folder over.
I had the same problem and I think I solved it:
You have to change the server address from smb to cifs, for example if your address is:
smb://ummsnas01/MarkLab$
…change it to:
cifs://ummsnas01/MarkLab$
That's it! Hopefully it works now for you too!
This work for me
[Shared]
comment = Folder Shared
path = /path
unix extensions = no
force group = root
force user = root
browsable = yes
writeable = yes
create mask = 0644
directory mask = 0755
force create mode = 0644
force directory mode = 0755
hide dot files = no
guest ok = no
public = no
valid users = @users
You can also try using a recent (4.2 or later) version of Samba that supports SMB2 and enabling vfs_fruit on the share. This will add support to Apple's AAPL extension for SMB2 which should work better that the Unix extensions for SMB1/CIFS.
I setup a Samba shared folder and I can access it through my other linux laptop (manjaro) but I can't write any changes to it. I get a Permission Denied message.
samba config file
Also I did steps 2/3 from this site to make samba work on Fedora 31.
Anyone know how can I make my shared folder writeable by other users mainly my other linux machine (manjaro)?
Thanks
I'm late to this, but I can't be the person that discovered a solution that worked (for me, at least) without putting it out there, since I've been that guy that screams at the "nvm fixed it" comments with no elaboration ;)
Your very first step is to check your fstab. You need to make sure you have
Enabled
xattrssupport on the filesystem you're sharing from, check yourfstab.Enabled ACL in mount options too, while you're there. Something like this, adjust for your environ:
/dev/disk/by-label/nas1 /mnt/nas1 ext4 defaults,user_xattr,acl,commit=60 0 2I just went through a couple of hours of troubleshooting why I got permission errors. I had simply forgotten point 2.
The rest of my setup was already OK with much less fuss than I thought:
Put this in
smb.conf[global] section:[global] vfs objects = fruit catia streams_xattr acl_xattr map acl inherit = yes fruit:aapl = yes fruit:model = MacSamba fruit:metadata = stream readdir_attr:aapl_rsize = yes readdir_attr:aapl_finder_info = yes readdir_attr:aapl_max_access = yesIf you wonder what the settings do, I humbly suggest you
$> man smb.conf(not a dig at the OP, I confused the text in their post with another more... ignorant post previously.)
The rest of the file can stay default. Change your workgroup name if you're an old Windows 3.11 guy that cares about syncing that across my LAN.
- In the share you want to have tag support for, these options work well for me:
[Pr0n] comment = Pr0n path = /mnt/nas1/Pr0n browseable = no guest ok = no read only = no writable = yes valid users = [ -- snip -- ] force directory mode = 0775 force create mode = 0664 # Fruit config fruit:posix_rename = yes fruit:veto_appledouble = yes fruit:nfs_aces = yes fruit:wipe_intentionally_left_blank_rfork = no fruit:delete_empty_adfiles = no
The directory is owned by my personal user and group, I did not need to fuddle around with net grant SeDiskOperatorStatus or any of that.
One reboot later (might as well, right) everything was automagically good, and tags are both allowed and stick.
It is possible that your PAM (Pluggable Authentication Module) setting is overrules your directory mask and create mask settings. Check the line: obey pam restrictions = no in your smb.conf.Should do the trick.