Samba permissions, specific user to subfolder only
I have two users: "pi" and "austria". Both users are in group www-data, which group is the owner of /mnt and can't be modified, as it's hosted. I want to separate the permissions in the samba. User pi to have permissions of the whole mount point /mnt/EXHDD1TB and user "austria" to have permissions only to the subfolder of /mnt/EXHDD1TB/ called "Movies", without the upper folder. My current smb.conf is the bellow one, but with this config user "austria" has access to everything, not only to the specific folder. Can you please help
[Movies]
comment = External Drive
path=/mnt/EXHDD1TB/Movies
valid users = austria
force group = www-data
writeable = yes
create mask = 0660
force create mode = 0110
directory mask = 0770
browseable = no
[All]
comment = External Drive
path=/mnt/EXHDD1TB/
valid users = pi, austria
force group = www-data
writeable = yes
create mask = 0660
force create mode = 0110
directory mask = 0770
browseable = no
linux raspberry-pi samba sharing
add a comment |
I have two users: "pi" and "austria". Both users are in group www-data, which group is the owner of /mnt and can't be modified, as it's hosted. I want to separate the permissions in the samba. User pi to have permissions of the whole mount point /mnt/EXHDD1TB and user "austria" to have permissions only to the subfolder of /mnt/EXHDD1TB/ called "Movies", without the upper folder. My current smb.conf is the bellow one, but with this config user "austria" has access to everything, not only to the specific folder. Can you please help
[Movies]
comment = External Drive
path=/mnt/EXHDD1TB/Movies
valid users = austria
force group = www-data
writeable = yes
create mask = 0660
force create mode = 0110
directory mask = 0770
browseable = no
[All]
comment = External Drive
path=/mnt/EXHDD1TB/
valid users = pi, austria
force group = www-data
writeable = yes
create mask = 0660
force create mode = 0110
directory mask = 0770
browseable = no
linux raspberry-pi samba sharing
add a comment |
I have two users: "pi" and "austria". Both users are in group www-data, which group is the owner of /mnt and can't be modified, as it's hosted. I want to separate the permissions in the samba. User pi to have permissions of the whole mount point /mnt/EXHDD1TB and user "austria" to have permissions only to the subfolder of /mnt/EXHDD1TB/ called "Movies", without the upper folder. My current smb.conf is the bellow one, but with this config user "austria" has access to everything, not only to the specific folder. Can you please help
[Movies]
comment = External Drive
path=/mnt/EXHDD1TB/Movies
valid users = austria
force group = www-data
writeable = yes
create mask = 0660
force create mode = 0110
directory mask = 0770
browseable = no
[All]
comment = External Drive
path=/mnt/EXHDD1TB/
valid users = pi, austria
force group = www-data
writeable = yes
create mask = 0660
force create mode = 0110
directory mask = 0770
browseable = no
linux raspberry-pi samba sharing
I have two users: "pi" and "austria". Both users are in group www-data, which group is the owner of /mnt and can't be modified, as it's hosted. I want to separate the permissions in the samba. User pi to have permissions of the whole mount point /mnt/EXHDD1TB and user "austria" to have permissions only to the subfolder of /mnt/EXHDD1TB/ called "Movies", without the upper folder. My current smb.conf is the bellow one, but with this config user "austria" has access to everything, not only to the specific folder. Can you please help
[Movies]
comment = External Drive
path=/mnt/EXHDD1TB/Movies
valid users = austria
force group = www-data
writeable = yes
create mask = 0660
force create mode = 0110
directory mask = 0770
browseable = no
[All]
comment = External Drive
path=/mnt/EXHDD1TB/
valid users = pi, austria
force group = www-data
writeable = yes
create mask = 0660
force create mode = 0110
directory mask = 0770
browseable = no
linux raspberry-pi samba sharing
linux raspberry-pi samba sharing
asked Feb 24 at 9:53
user3493945user3493945
31
31
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
As you don't want the user "austria" to have mount permissions for All, you should remove that user from the list of valid users.
User "austria" will have to access the share Movies, not All.
I already tried this, but with this configuration, I’m getting access denied. Without austria in All group, the user can’t access anything
– user3493945
Feb 24 at 11:06
What exactly have you tried, which error message did you get, is there anything in the logs?
– RalfFriedl
Feb 24 at 11:08
When I remove “austria” user, from valid users “All” group configuration - mount the drive with \192.168.1.10share and use austria as login user to access it I’m getting “Access denied. Contact your server administrator”. When the user is configured in All group valid users, it has access to the whole drive. I need austria user to have access only to Movies folder, and pi user to the whole drive
– user3493945
Feb 24 at 11:47
You need\192.168.1.10Movies.
– RalfFriedl
Feb 24 at 17:43
Yep that worked, all the time I was using the same share with diff credentials. I thought that All and Movies are user groups, not shares. Thanks for the help
– user3493945
Feb 26 at 2:42
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2fsuperuser.com%2fquestions%2f1408959%2fsamba-permissions-specific-user-to-subfolder-only%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
As you don't want the user "austria" to have mount permissions for All, you should remove that user from the list of valid users.
User "austria" will have to access the share Movies, not All.
I already tried this, but with this configuration, I’m getting access denied. Without austria in All group, the user can’t access anything
– user3493945
Feb 24 at 11:06
What exactly have you tried, which error message did you get, is there anything in the logs?
– RalfFriedl
Feb 24 at 11:08
When I remove “austria” user, from valid users “All” group configuration - mount the drive with \192.168.1.10share and use austria as login user to access it I’m getting “Access denied. Contact your server administrator”. When the user is configured in All group valid users, it has access to the whole drive. I need austria user to have access only to Movies folder, and pi user to the whole drive
– user3493945
Feb 24 at 11:47
You need\192.168.1.10Movies.
– RalfFriedl
Feb 24 at 17:43
Yep that worked, all the time I was using the same share with diff credentials. I thought that All and Movies are user groups, not shares. Thanks for the help
– user3493945
Feb 26 at 2:42
add a comment |
As you don't want the user "austria" to have mount permissions for All, you should remove that user from the list of valid users.
User "austria" will have to access the share Movies, not All.
I already tried this, but with this configuration, I’m getting access denied. Without austria in All group, the user can’t access anything
– user3493945
Feb 24 at 11:06
What exactly have you tried, which error message did you get, is there anything in the logs?
– RalfFriedl
Feb 24 at 11:08
When I remove “austria” user, from valid users “All” group configuration - mount the drive with \192.168.1.10share and use austria as login user to access it I’m getting “Access denied. Contact your server administrator”. When the user is configured in All group valid users, it has access to the whole drive. I need austria user to have access only to Movies folder, and pi user to the whole drive
– user3493945
Feb 24 at 11:47
You need\192.168.1.10Movies.
– RalfFriedl
Feb 24 at 17:43
Yep that worked, all the time I was using the same share with diff credentials. I thought that All and Movies are user groups, not shares. Thanks for the help
– user3493945
Feb 26 at 2:42
add a comment |
As you don't want the user "austria" to have mount permissions for All, you should remove that user from the list of valid users.
User "austria" will have to access the share Movies, not All.
As you don't want the user "austria" to have mount permissions for All, you should remove that user from the list of valid users.
User "austria" will have to access the share Movies, not All.
answered Feb 24 at 10:52
RalfFriedlRalfFriedl
1,220247
1,220247
I already tried this, but with this configuration, I’m getting access denied. Without austria in All group, the user can’t access anything
– user3493945
Feb 24 at 11:06
What exactly have you tried, which error message did you get, is there anything in the logs?
– RalfFriedl
Feb 24 at 11:08
When I remove “austria” user, from valid users “All” group configuration - mount the drive with \192.168.1.10share and use austria as login user to access it I’m getting “Access denied. Contact your server administrator”. When the user is configured in All group valid users, it has access to the whole drive. I need austria user to have access only to Movies folder, and pi user to the whole drive
– user3493945
Feb 24 at 11:47
You need\192.168.1.10Movies.
– RalfFriedl
Feb 24 at 17:43
Yep that worked, all the time I was using the same share with diff credentials. I thought that All and Movies are user groups, not shares. Thanks for the help
– user3493945
Feb 26 at 2:42
add a comment |
I already tried this, but with this configuration, I’m getting access denied. Without austria in All group, the user can’t access anything
– user3493945
Feb 24 at 11:06
What exactly have you tried, which error message did you get, is there anything in the logs?
– RalfFriedl
Feb 24 at 11:08
When I remove “austria” user, from valid users “All” group configuration - mount the drive with \192.168.1.10share and use austria as login user to access it I’m getting “Access denied. Contact your server administrator”. When the user is configured in All group valid users, it has access to the whole drive. I need austria user to have access only to Movies folder, and pi user to the whole drive
– user3493945
Feb 24 at 11:47
You need\192.168.1.10Movies.
– RalfFriedl
Feb 24 at 17:43
Yep that worked, all the time I was using the same share with diff credentials. I thought that All and Movies are user groups, not shares. Thanks for the help
– user3493945
Feb 26 at 2:42
I already tried this, but with this configuration, I’m getting access denied. Without austria in All group, the user can’t access anything
– user3493945
Feb 24 at 11:06
I already tried this, but with this configuration, I’m getting access denied. Without austria in All group, the user can’t access anything
– user3493945
Feb 24 at 11:06
What exactly have you tried, which error message did you get, is there anything in the logs?
– RalfFriedl
Feb 24 at 11:08
What exactly have you tried, which error message did you get, is there anything in the logs?
– RalfFriedl
Feb 24 at 11:08
When I remove “austria” user, from valid users “All” group configuration - mount the drive with \192.168.1.10share and use austria as login user to access it I’m getting “Access denied. Contact your server administrator”. When the user is configured in All group valid users, it has access to the whole drive. I need austria user to have access only to Movies folder, and pi user to the whole drive
– user3493945
Feb 24 at 11:47
When I remove “austria” user, from valid users “All” group configuration - mount the drive with \192.168.1.10share and use austria as login user to access it I’m getting “Access denied. Contact your server administrator”. When the user is configured in All group valid users, it has access to the whole drive. I need austria user to have access only to Movies folder, and pi user to the whole drive
– user3493945
Feb 24 at 11:47
You need
\192.168.1.10Movies.– RalfFriedl
Feb 24 at 17:43
You need
\192.168.1.10Movies.– RalfFriedl
Feb 24 at 17:43
Yep that worked, all the time I was using the same share with diff credentials. I thought that All and Movies are user groups, not shares. Thanks for the help
– user3493945
Feb 26 at 2:42
Yep that worked, all the time I was using the same share with diff credentials. I thought that All and Movies are user groups, not shares. Thanks for the help
– user3493945
Feb 26 at 2:42
add a comment |
Thanks for contributing an answer to Super User!
- 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%2fsuperuser.com%2fquestions%2f1408959%2fsamba-permissions-specific-user-to-subfolder-only%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