0

Trying to set up a Samba share where the members of the development group have full access to files in the share (regardless of the owner):

[global]
   workgroup = PREMPROVSOL
   server string = %h server (Samba, Ubuntu)
   interfaces = 127.0.0.0/8 10.0.10.0/24
   bind interfaces only = yes
   log file = /var/log/samba/log.%m
   max log size = 1000
   logging = file
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
   unix charset = UTF-8
   dos charset = CP932

[Development]
    path= /server/Development/
    writeable = yes
    create mask = 0777
    force create mode = 0777
    directory mask = 0777
    force directory mode = 0777
    security mask = 0777
    force security mode = 0777
    guest ok = no
    valid users = @development

Interestingly enough, the Windows 10 machine that accesses the share has more permissions than the Linux Mint machine logged in with the same credentials. For example:

Windows 10:
Create Folder FolderA in the share then create folder FolderA1 inside FolderA. No issues.

Linux Mint:
Create Folder FolderA in the share (Lock shows on folder). Unable to create anything inside FolderA

fstab entry on the Linux Mint box:

//10.0.10.240/Development /mnt/Development cifs nobrl,_netdev,vers=1.0,noserverino,iocharset=utf8,credentials=/home/spsimmons/.smbcred  0       0

Is there a setting somewhere I am missing? Thanks!

EDIT

From the Win10 Machine, I create FolderA and it has the following permissions:

drwxrwsr-x+  3 1001 1004    0 Jul 10 12:39 FolderA

FolderA1 inside of FolderA permissions:

drwxrwsr-x+  2 1001 1004    0 Jul 10 12:39 FolderA1

1004 is the GID of the group.

Created a folder from the Win10 machine that the Linux machine cannot create in.
Created a folder from the Linux machine that the Win10 machine CAN create in.
I'm not using fuse but I did add the file_mode=0777,dir_mode=0777 parameters to my mount line. Still no dice.

closed as off-topic by mikewhatever, karel, Rinzwind, Zanna, Volker Siegel Jul 14 at 0:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – mikewhatever, karel, Rinzwind, Zanna, Volker Siegel
If this question can be reworded to fit the rules in the help center, please edit the question.

  • None of the listed operating systems are official Ubuntu so off topic. Plus please read up on permissions... Windows gets set during mounting – Rinzwind Jul 11 at 15:36
  • He is running an Ubuntu Samba server. It's designed to be accessed by Windows, MacOS, and other Linux systems. How is his post off topic? – Morbius1 Jul 11 at 19:13
  • Unless earthmeLon answered your question I would suggest you post in the Ubuntu Forum - in the Server section. The people marking this as "not about Ubuntu" appear to think this is not a networking question but perhaps a dual booting question? If earthmeLon did answer your question please mark it that way so others may benefit. – Morbius1 Jul 14 at 11:31
  • Dual Booting??? I never said anything about that. I am running Ubuntu 19.04 as Samba Server. Isn't this an "Ask Ubuntu" forum? I have not marked earthmeLon's answer because it did not solve the problem. – Elcid_91 Jul 15 at 14:27
1

Mount Windows Shares Permanently has some great information and overview if you haven't seen it yet. Very simply, I believe you need the uid= configuration option in your /etc/fstab mountpoint entry and 2777 umask for directories.


Without you showing us the permissions of the directories (ie: FolderA, FolderA1) it will be hard to know for sure, but it is likely that the umask is set so that when files are created in Linux, they are created and associated to user's group and the user's user.

For example, if we have the shared directory /srv/www/ owned by www-data:www-data and all of the files are g+rw and I am in the www-data group, I should be able to read and write to all of those files. The complication occurs when I create a file as my user. When that happens, the file is created as user:user and www-data isn't part of the user group (and shouldn't be).

So, when you create files you need to ensure that they are being created as and tied to the developer group. The host system is both Windows and using a different filesystem type, so you have to consider that there is a translation layer (FUSE,SAMBA,CIFS) to adapt the files and permissions to work with Linux.

Normally, you'd be able to resolve these issues by setting up an entry in the Linux system's /etc/fstab and adding uid=DEVELOPER_ID,gid=DEVELOPER_ID,umask=0777 for configuration options. Instead of umask with many translated filesystems, we set the file_mode to determine the permissions of the files. Directories will need to have an adjustment of the special permission from 0 to 2. This enforces the group ownership of new files and directories (ie: 2777). For example:

uid=userID,gid=userID,file_mode=2777

You can also make this adjustment in your smb.conf for directory-specific configuration values, but you should specify the uid and gid to be your user in your fstab entry to prevent other issues.

With our previous /srv/www example, we could make sure that newly created files were owned by www-data and g+rwx with the following commands:

sudo chown www-data:www-data /srv/www
sudo chmod g+rw /srv/www
sudo chattr +S /srv/www

Any newly created file in /srv/www should be owned by the www-data group and have g+rw permissions.

Not the answer you're looking for? Browse other questions tagged or ask your own question.