Is there a way to let an application create files with 664 permissions?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
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
permissions
add a comment |Â
up vote
0
down vote
favorite
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
permissions
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 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 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 at 14:44
How are you starting it? if it's viasystemd
, I think you should be able to add aUMask
property e.g.UMask=0002
to the[Service]
section of the unit file
â steeldriver
Apr 28 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 at 23:18
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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
permissions
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
permissions
asked Apr 27 at 21:25
StackChrisChris
114
114
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 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 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 at 14:44
How are you starting it? if it's viasystemd
, I think you should be able to add aUMask
property e.g.UMask=0002
to the[Service]
section of the unit file
â steeldriver
Apr 28 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 at 23:18
add a comment |Â
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 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 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 at 14:44
How are you starting it? if it's viasystemd
, I think you should be able to add aUMask
property e.g.UMask=0002
to the[Service]
section of the unit file
â steeldriver
Apr 28 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 at 23:18
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 at 22:28
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 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 at 6:56
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 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 at 14:44
It seems the question remains the same: How can I set the umask myself when I start the process.
â StackChrisChris
Apr 28 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 at 20:52
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 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 at 23:18
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 at 23:18
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028974%2fis-there-a-way-to-let-an-application-create-files-with-664-permissions%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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 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 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 at 14:44
How are you starting it? if it's via
systemd
, I think you should be able to add aUMask
property e.g.UMask=0002
to the[Service]
section of the unit fileâ steeldriver
Apr 28 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 at 23:18