Ubuntu 18.10 samba share not working in non-home folder
I'm having trouble getting folders in my non-home folders shared via samba. If the share folder is in my home folder, it works fine. If it isn't it doesn't.
I want readonly access to any user (guest) on the network.
Bit of /etc/samba/smb.conf
that I changed:
; This doesn't work:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
; This works fine:
[Photos]
path = /home/diederik/Photos/
; writeable = No
; browseable = yes
guest ok = yes
Full config file here.
ls
ing the containing folders gives:
drwxrwxr-x 31 diederik diederik 4096 Oct 18 19:27 Photos
and
drwxrwxr-x 124 diederik diederik 20480 Nov 28 01:15 HomeMovies
So the ownership and access looks OK to me. (Sub folders also have correct access.)
When I browse locally (going to Files -> Other locations -> Network hostname -> Photos)
the app first shows me an access dialogue, on which I select Anonymous. This then allows me to browse the files. When I select Anonymous on my non-home folders, it says: Failed to mount Windows share: Permission denied.
(I also can't access the non-home folder share on my htpc, also running Ubuntu 18.10.)
After the failed access, I looked in /var/log/syslog
for anything samba related, but couldn't find anything. The folder /var/log/samba/
only contains old files, so nothing interesting there either.
I also tried to use the explorer: right click -> Local network share option for the non-home folders, but this also doesn't work.
Are the rules for samba somehow different for folders outside of your home folder?
mount samba
add a comment |
I'm having trouble getting folders in my non-home folders shared via samba. If the share folder is in my home folder, it works fine. If it isn't it doesn't.
I want readonly access to any user (guest) on the network.
Bit of /etc/samba/smb.conf
that I changed:
; This doesn't work:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
; This works fine:
[Photos]
path = /home/diederik/Photos/
; writeable = No
; browseable = yes
guest ok = yes
Full config file here.
ls
ing the containing folders gives:
drwxrwxr-x 31 diederik diederik 4096 Oct 18 19:27 Photos
and
drwxrwxr-x 124 diederik diederik 20480 Nov 28 01:15 HomeMovies
So the ownership and access looks OK to me. (Sub folders also have correct access.)
When I browse locally (going to Files -> Other locations -> Network hostname -> Photos)
the app first shows me an access dialogue, on which I select Anonymous. This then allows me to browse the files. When I select Anonymous on my non-home folders, it says: Failed to mount Windows share: Permission denied.
(I also can't access the non-home folder share on my htpc, also running Ubuntu 18.10.)
After the failed access, I looked in /var/log/syslog
for anything samba related, but couldn't find anything. The folder /var/log/samba/
only contains old files, so nothing interesting there either.
I also tried to use the explorer: right click -> Local network share option for the non-home folders, but this also doesn't work.
Are the rules for samba somehow different for folders outside of your home folder?
mount samba
Could you also postls /media/diederik/<hdd-guid>/HomeMovies
? Did you try by removing the space in the section name?
– Marc Vanhoomissen
Dec 20 '18 at 10:26
add a comment |
I'm having trouble getting folders in my non-home folders shared via samba. If the share folder is in my home folder, it works fine. If it isn't it doesn't.
I want readonly access to any user (guest) on the network.
Bit of /etc/samba/smb.conf
that I changed:
; This doesn't work:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
; This works fine:
[Photos]
path = /home/diederik/Photos/
; writeable = No
; browseable = yes
guest ok = yes
Full config file here.
ls
ing the containing folders gives:
drwxrwxr-x 31 diederik diederik 4096 Oct 18 19:27 Photos
and
drwxrwxr-x 124 diederik diederik 20480 Nov 28 01:15 HomeMovies
So the ownership and access looks OK to me. (Sub folders also have correct access.)
When I browse locally (going to Files -> Other locations -> Network hostname -> Photos)
the app first shows me an access dialogue, on which I select Anonymous. This then allows me to browse the files. When I select Anonymous on my non-home folders, it says: Failed to mount Windows share: Permission denied.
(I also can't access the non-home folder share on my htpc, also running Ubuntu 18.10.)
After the failed access, I looked in /var/log/syslog
for anything samba related, but couldn't find anything. The folder /var/log/samba/
only contains old files, so nothing interesting there either.
I also tried to use the explorer: right click -> Local network share option for the non-home folders, but this also doesn't work.
Are the rules for samba somehow different for folders outside of your home folder?
mount samba
I'm having trouble getting folders in my non-home folders shared via samba. If the share folder is in my home folder, it works fine. If it isn't it doesn't.
I want readonly access to any user (guest) on the network.
Bit of /etc/samba/smb.conf
that I changed:
; This doesn't work:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
; This works fine:
[Photos]
path = /home/diederik/Photos/
; writeable = No
; browseable = yes
guest ok = yes
Full config file here.
ls
ing the containing folders gives:
drwxrwxr-x 31 diederik diederik 4096 Oct 18 19:27 Photos
and
drwxrwxr-x 124 diederik diederik 20480 Nov 28 01:15 HomeMovies
So the ownership and access looks OK to me. (Sub folders also have correct access.)
When I browse locally (going to Files -> Other locations -> Network hostname -> Photos)
the app first shows me an access dialogue, on which I select Anonymous. This then allows me to browse the files. When I select Anonymous on my non-home folders, it says: Failed to mount Windows share: Permission denied.
(I also can't access the non-home folder share on my htpc, also running Ubuntu 18.10.)
After the failed access, I looked in /var/log/syslog
for anything samba related, but couldn't find anything. The folder /var/log/samba/
only contains old files, so nothing interesting there either.
I also tried to use the explorer: right click -> Local network share option for the non-home folders, but this also doesn't work.
Are the rules for samba somehow different for folders outside of your home folder?
mount samba
mount samba
asked Dec 20 '18 at 9:54
Diederik
274312
274312
Could you also postls /media/diederik/<hdd-guid>/HomeMovies
? Did you try by removing the space in the section name?
– Marc Vanhoomissen
Dec 20 '18 at 10:26
add a comment |
Could you also postls /media/diederik/<hdd-guid>/HomeMovies
? Did you try by removing the space in the section name?
– Marc Vanhoomissen
Dec 20 '18 at 10:26
Could you also post
ls /media/diederik/<hdd-guid>/HomeMovies
? Did you try by removing the space in the section name?– Marc Vanhoomissen
Dec 20 '18 at 10:26
Could you also post
ls /media/diederik/<hdd-guid>/HomeMovies
? Did you try by removing the space in the section name?– Marc Vanhoomissen
Dec 20 '18 at 10:26
add a comment |
1 Answer
1
active
oldest
votes
Change this:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
To this:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
force user = diederik
Then restart smbd: sudo service smbd restart
Reason:
The system creates /media/diederik with special permissions that allows only
diederik the ability to traverse the folder to get to what's past it. The guest user is not you so it will never get to the HomeMovies folder. force user
makes the guest user appear to be you - at least for this share.
Note: Even though the guest user appears to be you the share definition will still prevent a write.
EDIT: Just noticed this comment in your original post:
I also tried to use the explorer: right click -> Local network share
option for the non-home folders, but this also doesn't work.
You are going to have to undo that. Can't have two samba shares of the same folder using two different methods at the same time without samba getting confused. Just go back to File Manager > Local network share > and undo the share.
Thanks, theforce user
bit, fixed it. Thanks. It seems to work even with the file explorer setting set on the same folder. Go figure.
– Diederik
Dec 20 '18 at 12:43
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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%2faskubuntu.com%2fquestions%2f1103318%2fubuntu-18-10-samba-share-not-working-in-non-home-folder%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
Change this:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
To this:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
force user = diederik
Then restart smbd: sudo service smbd restart
Reason:
The system creates /media/diederik with special permissions that allows only
diederik the ability to traverse the folder to get to what's past it. The guest user is not you so it will never get to the HomeMovies folder. force user
makes the guest user appear to be you - at least for this share.
Note: Even though the guest user appears to be you the share definition will still prevent a write.
EDIT: Just noticed this comment in your original post:
I also tried to use the explorer: right click -> Local network share
option for the non-home folders, but this also doesn't work.
You are going to have to undo that. Can't have two samba shares of the same folder using two different methods at the same time without samba getting confused. Just go back to File Manager > Local network share > and undo the share.
Thanks, theforce user
bit, fixed it. Thanks. It seems to work even with the file explorer setting set on the same folder. Go figure.
– Diederik
Dec 20 '18 at 12:43
add a comment |
Change this:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
To this:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
force user = diederik
Then restart smbd: sudo service smbd restart
Reason:
The system creates /media/diederik with special permissions that allows only
diederik the ability to traverse the folder to get to what's past it. The guest user is not you so it will never get to the HomeMovies folder. force user
makes the guest user appear to be you - at least for this share.
Note: Even though the guest user appears to be you the share definition will still prevent a write.
EDIT: Just noticed this comment in your original post:
I also tried to use the explorer: right click -> Local network share
option for the non-home folders, but this also doesn't work.
You are going to have to undo that. Can't have two samba shares of the same folder using two different methods at the same time without samba getting confused. Just go back to File Manager > Local network share > and undo the share.
Thanks, theforce user
bit, fixed it. Thanks. It seems to work even with the file explorer setting set on the same folder. Go figure.
– Diederik
Dec 20 '18 at 12:43
add a comment |
Change this:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
To this:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
force user = diederik
Then restart smbd: sudo service smbd restart
Reason:
The system creates /media/diederik with special permissions that allows only
diederik the ability to traverse the folder to get to what's past it. The guest user is not you so it will never get to the HomeMovies folder. force user
makes the guest user appear to be you - at least for this share.
Note: Even though the guest user appears to be you the share definition will still prevent a write.
EDIT: Just noticed this comment in your original post:
I also tried to use the explorer: right click -> Local network share
option for the non-home folders, but this also doesn't work.
You are going to have to undo that. Can't have two samba shares of the same folder using two different methods at the same time without samba getting confused. Just go back to File Manager > Local network share > and undo the share.
Change this:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
To this:
[Home movies]
path = /media/diederik/<hdd-guid>/HomeMovies
; writeable = No
; browseable = yes
guest ok = yes
force user = diederik
Then restart smbd: sudo service smbd restart
Reason:
The system creates /media/diederik with special permissions that allows only
diederik the ability to traverse the folder to get to what's past it. The guest user is not you so it will never get to the HomeMovies folder. force user
makes the guest user appear to be you - at least for this share.
Note: Even though the guest user appears to be you the share definition will still prevent a write.
EDIT: Just noticed this comment in your original post:
I also tried to use the explorer: right click -> Local network share
option for the non-home folders, but this also doesn't work.
You are going to have to undo that. Can't have two samba shares of the same folder using two different methods at the same time without samba getting confused. Just go back to File Manager > Local network share > and undo the share.
edited Dec 20 '18 at 12:08
answered Dec 20 '18 at 11:23
Morbius1
1,366127
1,366127
Thanks, theforce user
bit, fixed it. Thanks. It seems to work even with the file explorer setting set on the same folder. Go figure.
– Diederik
Dec 20 '18 at 12:43
add a comment |
Thanks, theforce user
bit, fixed it. Thanks. It seems to work even with the file explorer setting set on the same folder. Go figure.
– Diederik
Dec 20 '18 at 12:43
Thanks, the
force user
bit, fixed it. Thanks. It seems to work even with the file explorer setting set on the same folder. Go figure.– Diederik
Dec 20 '18 at 12:43
Thanks, the
force user
bit, fixed it. Thanks. It seems to work even with the file explorer setting set on the same folder. Go figure.– Diederik
Dec 20 '18 at 12:43
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f1103318%2fubuntu-18-10-samba-share-not-working-in-non-home-folder%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
Could you also post
ls /media/diederik/<hdd-guid>/HomeMovies
? Did you try by removing the space in the section name?– Marc Vanhoomissen
Dec 20 '18 at 10:26