Make subdirectory world writable even if parent folder is not
Clash Royale CLAN TAG#URR8PPP
i have a folder called Public inside my home folder. I need to share this folder (write only) via samba. However if i chmod 772 Public it doesn't work since my home folder is 750. Is there a way to solve this without chmod 777 my home folder?
permissions samba shared-folders
add a comment |
i have a folder called Public inside my home folder. I need to share this folder (write only) via samba. However if i chmod 772 Public it doesn't work since my home folder is 750. Is there a way to solve this without chmod 777 my home folder?
permissions samba shared-folders
probably a symlink will do it.
– mikeserv
Jan 6 '16 at 15:48
4
You must add theexecute
priv to your home dir so it can be used in other paths. They don't need read or write, justx
– Eric Renouf
Jan 6 '16 at 15:50
1
Consider: unix.stackexchange.com/questions/21251/…
– Eric Renouf
Jan 6 '16 at 15:51
you could chmod 755 /home/yourname
– John Militer
Apr 24 '16 at 22:29
add a comment |
i have a folder called Public inside my home folder. I need to share this folder (write only) via samba. However if i chmod 772 Public it doesn't work since my home folder is 750. Is there a way to solve this without chmod 777 my home folder?
permissions samba shared-folders
i have a folder called Public inside my home folder. I need to share this folder (write only) via samba. However if i chmod 772 Public it doesn't work since my home folder is 750. Is there a way to solve this without chmod 777 my home folder?
permissions samba shared-folders
permissions samba shared-folders
edited Dec 20 '18 at 7:27
Rui F Ribeiro
39k1479130
39k1479130
asked Jan 6 '16 at 15:43
Matteo
3051513
3051513
probably a symlink will do it.
– mikeserv
Jan 6 '16 at 15:48
4
You must add theexecute
priv to your home dir so it can be used in other paths. They don't need read or write, justx
– Eric Renouf
Jan 6 '16 at 15:50
1
Consider: unix.stackexchange.com/questions/21251/…
– Eric Renouf
Jan 6 '16 at 15:51
you could chmod 755 /home/yourname
– John Militer
Apr 24 '16 at 22:29
add a comment |
probably a symlink will do it.
– mikeserv
Jan 6 '16 at 15:48
4
You must add theexecute
priv to your home dir so it can be used in other paths. They don't need read or write, justx
– Eric Renouf
Jan 6 '16 at 15:50
1
Consider: unix.stackexchange.com/questions/21251/…
– Eric Renouf
Jan 6 '16 at 15:51
you could chmod 755 /home/yourname
– John Militer
Apr 24 '16 at 22:29
probably a symlink will do it.
– mikeserv
Jan 6 '16 at 15:48
probably a symlink will do it.
– mikeserv
Jan 6 '16 at 15:48
4
4
You must add the
execute
priv to your home dir so it can be used in other paths. They don't need read or write, just x
– Eric Renouf
Jan 6 '16 at 15:50
You must add the
execute
priv to your home dir so it can be used in other paths. They don't need read or write, just x
– Eric Renouf
Jan 6 '16 at 15:50
1
1
Consider: unix.stackexchange.com/questions/21251/…
– Eric Renouf
Jan 6 '16 at 15:51
Consider: unix.stackexchange.com/questions/21251/…
– Eric Renouf
Jan 6 '16 at 15:51
you could chmod 755 /home/yourname
– John Militer
Apr 24 '16 at 22:29
you could chmod 755 /home/yourname
– John Militer
Apr 24 '16 at 22:29
add a comment |
2 Answers
2
active
oldest
votes
You could use the force user
directive on the SAMBA share definition to ensure all network access is made as your user account. The missing "other" permissions on the parent directory then become irrelevant.
Without knowing the details of your requirement there's little point suggesting more complex alternatives.
Hmm... This would mean that all new files were owned by the account, not by the users creating the files. It would also mean that access permissions on individual files and subdirectories would become (more or less) ineffective.
– Kusalananda
Dec 20 '18 at 9:11
@Kusalananda without details of what the OP wants it's as good a suggestion as any. UNIX style permissions and SAMBA permissions often don't cleanly intersect (well, not intuitively).
– roaima
Dec 20 '18 at 11:46
add a comment |
To access a directory, the directory itself, as well as all the intermediate directories from the root down, has to have the x
permission for the given user, their group or all. This would allow reading files in the directory if one knew their pathnames (listing the contents of the directory would not be allowed unless r
was also in effect).
For a world-write-only directory ("write" meaning "permitting the creation and deletion of files and subdirectories, and updating their metadata"), the permissions on the directory itself should be wx
, and all parent directories should have at least x
.
If you are creating a "drop box" in your home directory, therefore:
cd
mkdir directory
chmod o=wx,g=wx directory
chmod a+x "$HOME"
Note that I'm also giving the group wx
access to the directory here (rather than using g=
). A member of the group who owns the directory (probably your primary group) would otherwise be explicitly denied access to the directory even though o=wx
was in effect.
Assuming you as the owner has rwx
permissions to the directory, this is equivalent to the octal permissions 0733 on the "drop box" directory.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f253646%2fmake-subdirectory-world-writable-even-if-parent-folder-is-not%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You could use the force user
directive on the SAMBA share definition to ensure all network access is made as your user account. The missing "other" permissions on the parent directory then become irrelevant.
Without knowing the details of your requirement there's little point suggesting more complex alternatives.
Hmm... This would mean that all new files were owned by the account, not by the users creating the files. It would also mean that access permissions on individual files and subdirectories would become (more or less) ineffective.
– Kusalananda
Dec 20 '18 at 9:11
@Kusalananda without details of what the OP wants it's as good a suggestion as any. UNIX style permissions and SAMBA permissions often don't cleanly intersect (well, not intuitively).
– roaima
Dec 20 '18 at 11:46
add a comment |
You could use the force user
directive on the SAMBA share definition to ensure all network access is made as your user account. The missing "other" permissions on the parent directory then become irrelevant.
Without knowing the details of your requirement there's little point suggesting more complex alternatives.
Hmm... This would mean that all new files were owned by the account, not by the users creating the files. It would also mean that access permissions on individual files and subdirectories would become (more or less) ineffective.
– Kusalananda
Dec 20 '18 at 9:11
@Kusalananda without details of what the OP wants it's as good a suggestion as any. UNIX style permissions and SAMBA permissions often don't cleanly intersect (well, not intuitively).
– roaima
Dec 20 '18 at 11:46
add a comment |
You could use the force user
directive on the SAMBA share definition to ensure all network access is made as your user account. The missing "other" permissions on the parent directory then become irrelevant.
Without knowing the details of your requirement there's little point suggesting more complex alternatives.
You could use the force user
directive on the SAMBA share definition to ensure all network access is made as your user account. The missing "other" permissions on the parent directory then become irrelevant.
Without knowing the details of your requirement there's little point suggesting more complex alternatives.
answered Dec 20 '18 at 7:56
roaima
42.8k551116
42.8k551116
Hmm... This would mean that all new files were owned by the account, not by the users creating the files. It would also mean that access permissions on individual files and subdirectories would become (more or less) ineffective.
– Kusalananda
Dec 20 '18 at 9:11
@Kusalananda without details of what the OP wants it's as good a suggestion as any. UNIX style permissions and SAMBA permissions often don't cleanly intersect (well, not intuitively).
– roaima
Dec 20 '18 at 11:46
add a comment |
Hmm... This would mean that all new files were owned by the account, not by the users creating the files. It would also mean that access permissions on individual files and subdirectories would become (more or less) ineffective.
– Kusalananda
Dec 20 '18 at 9:11
@Kusalananda without details of what the OP wants it's as good a suggestion as any. UNIX style permissions and SAMBA permissions often don't cleanly intersect (well, not intuitively).
– roaima
Dec 20 '18 at 11:46
Hmm... This would mean that all new files were owned by the account, not by the users creating the files. It would also mean that access permissions on individual files and subdirectories would become (more or less) ineffective.
– Kusalananda
Dec 20 '18 at 9:11
Hmm... This would mean that all new files were owned by the account, not by the users creating the files. It would also mean that access permissions on individual files and subdirectories would become (more or less) ineffective.
– Kusalananda
Dec 20 '18 at 9:11
@Kusalananda without details of what the OP wants it's as good a suggestion as any. UNIX style permissions and SAMBA permissions often don't cleanly intersect (well, not intuitively).
– roaima
Dec 20 '18 at 11:46
@Kusalananda without details of what the OP wants it's as good a suggestion as any. UNIX style permissions and SAMBA permissions often don't cleanly intersect (well, not intuitively).
– roaima
Dec 20 '18 at 11:46
add a comment |
To access a directory, the directory itself, as well as all the intermediate directories from the root down, has to have the x
permission for the given user, their group or all. This would allow reading files in the directory if one knew their pathnames (listing the contents of the directory would not be allowed unless r
was also in effect).
For a world-write-only directory ("write" meaning "permitting the creation and deletion of files and subdirectories, and updating their metadata"), the permissions on the directory itself should be wx
, and all parent directories should have at least x
.
If you are creating a "drop box" in your home directory, therefore:
cd
mkdir directory
chmod o=wx,g=wx directory
chmod a+x "$HOME"
Note that I'm also giving the group wx
access to the directory here (rather than using g=
). A member of the group who owns the directory (probably your primary group) would otherwise be explicitly denied access to the directory even though o=wx
was in effect.
Assuming you as the owner has rwx
permissions to the directory, this is equivalent to the octal permissions 0733 on the "drop box" directory.
add a comment |
To access a directory, the directory itself, as well as all the intermediate directories from the root down, has to have the x
permission for the given user, their group or all. This would allow reading files in the directory if one knew their pathnames (listing the contents of the directory would not be allowed unless r
was also in effect).
For a world-write-only directory ("write" meaning "permitting the creation and deletion of files and subdirectories, and updating their metadata"), the permissions on the directory itself should be wx
, and all parent directories should have at least x
.
If you are creating a "drop box" in your home directory, therefore:
cd
mkdir directory
chmod o=wx,g=wx directory
chmod a+x "$HOME"
Note that I'm also giving the group wx
access to the directory here (rather than using g=
). A member of the group who owns the directory (probably your primary group) would otherwise be explicitly denied access to the directory even though o=wx
was in effect.
Assuming you as the owner has rwx
permissions to the directory, this is equivalent to the octal permissions 0733 on the "drop box" directory.
add a comment |
To access a directory, the directory itself, as well as all the intermediate directories from the root down, has to have the x
permission for the given user, their group or all. This would allow reading files in the directory if one knew their pathnames (listing the contents of the directory would not be allowed unless r
was also in effect).
For a world-write-only directory ("write" meaning "permitting the creation and deletion of files and subdirectories, and updating their metadata"), the permissions on the directory itself should be wx
, and all parent directories should have at least x
.
If you are creating a "drop box" in your home directory, therefore:
cd
mkdir directory
chmod o=wx,g=wx directory
chmod a+x "$HOME"
Note that I'm also giving the group wx
access to the directory here (rather than using g=
). A member of the group who owns the directory (probably your primary group) would otherwise be explicitly denied access to the directory even though o=wx
was in effect.
Assuming you as the owner has rwx
permissions to the directory, this is equivalent to the octal permissions 0733 on the "drop box" directory.
To access a directory, the directory itself, as well as all the intermediate directories from the root down, has to have the x
permission for the given user, their group or all. This would allow reading files in the directory if one knew their pathnames (listing the contents of the directory would not be allowed unless r
was also in effect).
For a world-write-only directory ("write" meaning "permitting the creation and deletion of files and subdirectories, and updating their metadata"), the permissions on the directory itself should be wx
, and all parent directories should have at least x
.
If you are creating a "drop box" in your home directory, therefore:
cd
mkdir directory
chmod o=wx,g=wx directory
chmod a+x "$HOME"
Note that I'm also giving the group wx
access to the directory here (rather than using g=
). A member of the group who owns the directory (probably your primary group) would otherwise be explicitly denied access to the directory even though o=wx
was in effect.
Assuming you as the owner has rwx
permissions to the directory, this is equivalent to the octal permissions 0733 on the "drop box" directory.
answered Dec 20 '18 at 8:25
Kusalananda
121k16229372
121k16229372
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f253646%2fmake-subdirectory-world-writable-even-if-parent-folder-is-not%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
probably a symlink will do it.
– mikeserv
Jan 6 '16 at 15:48
4
You must add the
execute
priv to your home dir so it can be used in other paths. They don't need read or write, justx
– Eric Renouf
Jan 6 '16 at 15:50
1
Consider: unix.stackexchange.com/questions/21251/…
– Eric Renouf
Jan 6 '16 at 15:51
you could chmod 755 /home/yourname
– John Militer
Apr 24 '16 at 22:29