This is a bit of a tricky issue and I am not sure where to ask this question. Maybe someone tried something similar already and ran into a similar issue.

The following scenario:

I have a Seafile server 6.2.5 on an Ubuntu 16.04 RootServer --> cloud.example.com (seafile.com --> Opensoruce Cloud solution)

Inside my home network: A Helios4 NAS system with ARM processor and Openmediavault (OMV) is running with Samba shares and headless seaf-cli installed.

On the Helios4 a headless seaf-cli is running under the user “seafile”.

The Seafile Server cloud.example.com shares Library1.

The seaf-cli on the Helios4 syncs Library1 to a Samba share folder “Samba1”.

Samba1 is shared as read/write to the users seafile, user1 and user2. The sync of Library1 works flawless. All files of Library1 are synced to Samba1. A ls -l in Samba1 shows the permissions to be:

ls -l drwxr-sr-x 2 seafile users 4096 Apr 2 08:24 Folder1 -rw-r–r-- 1 seafile users 452334049 Mar 29 09:45 Movie1.MOV -rw-r–r-- 1 seafile users 422486 Mar 29 10:42 Word.docx -rw-r–r-- 1 seafile users 433303 Mar 14 17:46 Letter.pdf

If I access the files as user1 or user2 from a Mac inside the share Samba1 I can’t edit the files which were written by seaf-cli under user seafile, but can open/read them.

If I access the files as the user seafile from the same Mac inside the Samba1 then I can edit the files which were written by seaf-cli under user seafile. So can read/write.

The reason is that seaf-cli writes files with 644 permissions on user seafile.

So my question is like this: Is there a way to let the seaf-cli application create all files with 664 permissions? Then user1 and user2 could read/write in the samba share.

Help would be ver much appreciated ;-)

Greetings, Chris

  • According to the Seafile client changelog it should "Respect umask on Linux" since version 4.2.0 (although it's not clear to me whether there's an actual umask configuration setting, or whether you need to set the umask yourself when you start the process) – steeldriver Apr 27 '18 at 22:28
  • Thanks already for your answer. I did quite a bit more googling this night and understood that what I need to do is to change the umask to 002. First time I looked at "umask", but seems generally pretty straight forward. I will check if I can set the umask in the seaf-cli config file and will post it here. There is a config that seafioe-cli calles during startup. But may I also ask how to to generally start processes with umask 002. So that I can understand the concept of starting applications with a different umask. Then this post would cover both scenarios. – StackChrisChris Apr 28 '18 at 6:56
  • It seems the question remains the same: How can I set the umask myself when I start the process. – StackChrisChris Apr 28 '18 at 14:44
  • How are you starting it? if it's via systemd, I think you should be able to add a UMask property e.g. UMask=0002 to the [Service] section of the unit file – steeldriver Apr 28 '18 at 20:52
  • I am starting it with an unit.d script based on the description on this website: wp.yawc.de/2015/01/seafile-cli-autostart. I tried to add a —umask 002 after "su -c" inside the script and start the service with “sudo service deaf-cli start —umask 002” , which both did not work. – StackChrisChris Apr 29 '18 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.