No Read-Write on Samba Share
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
IâÂÂm unable to edit files on a Samba share.
IâÂÂve got two machines, srv001 and desk001, both with Arch Linux. I want to connect to srv001 from desk001 using samba and sshfs (different scenarios), but I installed them a little differently, resulting in the users having different UIDs/GIDs (see below).
srv001 - Users:
- UserA [1000], primary group âÂÂmediaPublic [1002]âÂÂ
- ServerA [1001], primary group âÂÂmediaPublic [1002]âÂÂ
desk001 â Users:
- UserA [1001], primary group âÂÂmediaPublic [1001]âÂÂ
- ServerA [1000], primary group âÂÂmediaPublic [1001]âÂÂ
Most of the served files on my server belong to ServerA:mediaPublic, both users UserA and ServerA belong to group mediaPublic. They have a Samba entry:
[media_public]
comment = Media Server Centre - Media Files
read only = no
locking = yes
path = /mnt/local/media/public
guest ok = no
write list = UserA, ServerA
force create mode = 2770
force directory mode = 2770
force user = msc
force group = mediaPublic
...and an /etc/fstab entry:
//srv001/media_public /mnt/remote/srv001/public cifs vers=2.1,uid=1000,gid=1001,username=UserA,password=APassword 0 0
Before Mounting:
[root@desk001 srv001]# ls -l
total 4K
drwxrwxr-x 2 ServerA media_public 4K May 24 19:35 public
After Mounting
[root@desk001 srv001]$ ls -l
total 0
drwxr-xr-x 2 ServerA media_public 0K May 27 17:30 public
After Mounting - Public Subfolder
[root@desk001 srv001]# ls /mnt/remote/srv001/public/ -l --block-size=M
total 527M
-rwxr-xr-x 1 ServerA media_public 523M Oct 6 2017
archlinux-2017.10.01-x86_64.iso
drwxr-xr-x 2 ServerA mediaPublic 1M Jan 19 2017 Images
drwxr-xr-x 2 ServerA mediaPublic 1M May 25 09:41 Torrents
drwxr-xr-x 2 ServerA mediaPublic 1M May 24 22:19 TVShows
drwxr-xr-x 2 ServerA mediaPublic 1M Dec 20 12:12 Wallpapers
srv001
root@msc001x: /mnt/local/int001/MEDIA$ ls -l --block-size=K
total 104032K
drwxrws---+ 1 ServerA mediaPublic 1K Dec 16 22:07 Personal
-rwxrws--- 1 ServerA mediaPublic 104032K May 30 2017 plexmediaserver_1.7.2.3878-8088811b8_amd64.deb
drwxrwsr-x+ 1 ServerA mediaPublic 1K May 27 17:30 Public
srv001 - public sub folder
root@srv001:/mnt/local/int001/MEDIA/Public$ ls -l --block-size=M
total 527M
-rwxrwxr-x 1 ServerA mediaPublic 523M Oct 6 2017 archlinux-2017.10.01-x86_64.iso
drwxrwsr-x+ 1 ServerA mediaPublic 1M Jan 19 2017 Images
drwxrwsr-x+ 1 ServerA mediaPublic 1M May 25 09:41 Torrents
drwxrwsr-x+ 1 ServerA mediaPublic 1M May 24 22:19 TVShows
drwxrwsr-x+ 1 ServerA mediaPublic 1M Dec 20 12:12 Wallpapers
What is my problem. Firstly how, with the above Samba scenario, can I map the users so I can access the files as the correct user. Secondly, why is it mounting as 755 when it was originally 775 before mount.,
samba
 |Â
show 5 more comments
up vote
0
down vote
favorite
IâÂÂm unable to edit files on a Samba share.
IâÂÂve got two machines, srv001 and desk001, both with Arch Linux. I want to connect to srv001 from desk001 using samba and sshfs (different scenarios), but I installed them a little differently, resulting in the users having different UIDs/GIDs (see below).
srv001 - Users:
- UserA [1000], primary group âÂÂmediaPublic [1002]âÂÂ
- ServerA [1001], primary group âÂÂmediaPublic [1002]âÂÂ
desk001 â Users:
- UserA [1001], primary group âÂÂmediaPublic [1001]âÂÂ
- ServerA [1000], primary group âÂÂmediaPublic [1001]âÂÂ
Most of the served files on my server belong to ServerA:mediaPublic, both users UserA and ServerA belong to group mediaPublic. They have a Samba entry:
[media_public]
comment = Media Server Centre - Media Files
read only = no
locking = yes
path = /mnt/local/media/public
guest ok = no
write list = UserA, ServerA
force create mode = 2770
force directory mode = 2770
force user = msc
force group = mediaPublic
...and an /etc/fstab entry:
//srv001/media_public /mnt/remote/srv001/public cifs vers=2.1,uid=1000,gid=1001,username=UserA,password=APassword 0 0
Before Mounting:
[root@desk001 srv001]# ls -l
total 4K
drwxrwxr-x 2 ServerA media_public 4K May 24 19:35 public
After Mounting
[root@desk001 srv001]$ ls -l
total 0
drwxr-xr-x 2 ServerA media_public 0K May 27 17:30 public
After Mounting - Public Subfolder
[root@desk001 srv001]# ls /mnt/remote/srv001/public/ -l --block-size=M
total 527M
-rwxr-xr-x 1 ServerA media_public 523M Oct 6 2017
archlinux-2017.10.01-x86_64.iso
drwxr-xr-x 2 ServerA mediaPublic 1M Jan 19 2017 Images
drwxr-xr-x 2 ServerA mediaPublic 1M May 25 09:41 Torrents
drwxr-xr-x 2 ServerA mediaPublic 1M May 24 22:19 TVShows
drwxr-xr-x 2 ServerA mediaPublic 1M Dec 20 12:12 Wallpapers
srv001
root@msc001x: /mnt/local/int001/MEDIA$ ls -l --block-size=K
total 104032K
drwxrws---+ 1 ServerA mediaPublic 1K Dec 16 22:07 Personal
-rwxrws--- 1 ServerA mediaPublic 104032K May 30 2017 plexmediaserver_1.7.2.3878-8088811b8_amd64.deb
drwxrwsr-x+ 1 ServerA mediaPublic 1K May 27 17:30 Public
srv001 - public sub folder
root@srv001:/mnt/local/int001/MEDIA/Public$ ls -l --block-size=M
total 527M
-rwxrwxr-x 1 ServerA mediaPublic 523M Oct 6 2017 archlinux-2017.10.01-x86_64.iso
drwxrwsr-x+ 1 ServerA mediaPublic 1M Jan 19 2017 Images
drwxrwsr-x+ 1 ServerA mediaPublic 1M May 25 09:41 Torrents
drwxrwsr-x+ 1 ServerA mediaPublic 1M May 24 22:19 TVShows
drwxrwsr-x+ 1 ServerA mediaPublic 1M Dec 20 12:12 Wallpapers
What is my problem. Firstly how, with the above Samba scenario, can I map the users so I can access the files as the correct user. Secondly, why is it mounting as 755 when it was originally 775 before mount.,
samba
UnlikeNFS
, theuid
andgid
don't need to be the same withsmb
. Did you set ansmb password
forUserA
andServerA
onsrv001
? Are you using those to connect to the share?
â Nasir Riley
May 27 at 14:34
@NasirRiley I am, I just changed it to a credential file and it acts the same way. Starts as 775 before mounting (mount point and remote directory), becomes 755 after mounting.
â aSystemOverload
May 27 at 15:02
Edit your question to include the output ofls -l
on the share before and after it's mounted.
â Nasir Riley
May 27 at 15:09
I've added the ls -l as requested./
â aSystemOverload
May 27 at 15:45
1
I'm still rather confused here. Yourfstab
says that the mountpoint ondesk001
is/mnt/remote/srv001/public
but then you runls -l
on/mnt/remote/msc001x/public/
which is a different directory. The directories onSrv001
show that the directories have sizes greater than zero and there is also a file calledarchlinux-2017.10.01-x86_64.iso
whereas the directories ondesk001
have sizes of0
andarchlinux-2017.10.01-x86_64.iso
is nowhere to be found. Also, what is/mnt/local/int001/MEDIA/Public$
underSrv001 - same folder
? I thought that the share wasmedia_public
?
â Nasir Riley
May 30 at 0:41
 |Â
show 5 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
IâÂÂm unable to edit files on a Samba share.
IâÂÂve got two machines, srv001 and desk001, both with Arch Linux. I want to connect to srv001 from desk001 using samba and sshfs (different scenarios), but I installed them a little differently, resulting in the users having different UIDs/GIDs (see below).
srv001 - Users:
- UserA [1000], primary group âÂÂmediaPublic [1002]âÂÂ
- ServerA [1001], primary group âÂÂmediaPublic [1002]âÂÂ
desk001 â Users:
- UserA [1001], primary group âÂÂmediaPublic [1001]âÂÂ
- ServerA [1000], primary group âÂÂmediaPublic [1001]âÂÂ
Most of the served files on my server belong to ServerA:mediaPublic, both users UserA and ServerA belong to group mediaPublic. They have a Samba entry:
[media_public]
comment = Media Server Centre - Media Files
read only = no
locking = yes
path = /mnt/local/media/public
guest ok = no
write list = UserA, ServerA
force create mode = 2770
force directory mode = 2770
force user = msc
force group = mediaPublic
...and an /etc/fstab entry:
//srv001/media_public /mnt/remote/srv001/public cifs vers=2.1,uid=1000,gid=1001,username=UserA,password=APassword 0 0
Before Mounting:
[root@desk001 srv001]# ls -l
total 4K
drwxrwxr-x 2 ServerA media_public 4K May 24 19:35 public
After Mounting
[root@desk001 srv001]$ ls -l
total 0
drwxr-xr-x 2 ServerA media_public 0K May 27 17:30 public
After Mounting - Public Subfolder
[root@desk001 srv001]# ls /mnt/remote/srv001/public/ -l --block-size=M
total 527M
-rwxr-xr-x 1 ServerA media_public 523M Oct 6 2017
archlinux-2017.10.01-x86_64.iso
drwxr-xr-x 2 ServerA mediaPublic 1M Jan 19 2017 Images
drwxr-xr-x 2 ServerA mediaPublic 1M May 25 09:41 Torrents
drwxr-xr-x 2 ServerA mediaPublic 1M May 24 22:19 TVShows
drwxr-xr-x 2 ServerA mediaPublic 1M Dec 20 12:12 Wallpapers
srv001
root@msc001x: /mnt/local/int001/MEDIA$ ls -l --block-size=K
total 104032K
drwxrws---+ 1 ServerA mediaPublic 1K Dec 16 22:07 Personal
-rwxrws--- 1 ServerA mediaPublic 104032K May 30 2017 plexmediaserver_1.7.2.3878-8088811b8_amd64.deb
drwxrwsr-x+ 1 ServerA mediaPublic 1K May 27 17:30 Public
srv001 - public sub folder
root@srv001:/mnt/local/int001/MEDIA/Public$ ls -l --block-size=M
total 527M
-rwxrwxr-x 1 ServerA mediaPublic 523M Oct 6 2017 archlinux-2017.10.01-x86_64.iso
drwxrwsr-x+ 1 ServerA mediaPublic 1M Jan 19 2017 Images
drwxrwsr-x+ 1 ServerA mediaPublic 1M May 25 09:41 Torrents
drwxrwsr-x+ 1 ServerA mediaPublic 1M May 24 22:19 TVShows
drwxrwsr-x+ 1 ServerA mediaPublic 1M Dec 20 12:12 Wallpapers
What is my problem. Firstly how, with the above Samba scenario, can I map the users so I can access the files as the correct user. Secondly, why is it mounting as 755 when it was originally 775 before mount.,
samba
IâÂÂm unable to edit files on a Samba share.
IâÂÂve got two machines, srv001 and desk001, both with Arch Linux. I want to connect to srv001 from desk001 using samba and sshfs (different scenarios), but I installed them a little differently, resulting in the users having different UIDs/GIDs (see below).
srv001 - Users:
- UserA [1000], primary group âÂÂmediaPublic [1002]âÂÂ
- ServerA [1001], primary group âÂÂmediaPublic [1002]âÂÂ
desk001 â Users:
- UserA [1001], primary group âÂÂmediaPublic [1001]âÂÂ
- ServerA [1000], primary group âÂÂmediaPublic [1001]âÂÂ
Most of the served files on my server belong to ServerA:mediaPublic, both users UserA and ServerA belong to group mediaPublic. They have a Samba entry:
[media_public]
comment = Media Server Centre - Media Files
read only = no
locking = yes
path = /mnt/local/media/public
guest ok = no
write list = UserA, ServerA
force create mode = 2770
force directory mode = 2770
force user = msc
force group = mediaPublic
...and an /etc/fstab entry:
//srv001/media_public /mnt/remote/srv001/public cifs vers=2.1,uid=1000,gid=1001,username=UserA,password=APassword 0 0
Before Mounting:
[root@desk001 srv001]# ls -l
total 4K
drwxrwxr-x 2 ServerA media_public 4K May 24 19:35 public
After Mounting
[root@desk001 srv001]$ ls -l
total 0
drwxr-xr-x 2 ServerA media_public 0K May 27 17:30 public
After Mounting - Public Subfolder
[root@desk001 srv001]# ls /mnt/remote/srv001/public/ -l --block-size=M
total 527M
-rwxr-xr-x 1 ServerA media_public 523M Oct 6 2017
archlinux-2017.10.01-x86_64.iso
drwxr-xr-x 2 ServerA mediaPublic 1M Jan 19 2017 Images
drwxr-xr-x 2 ServerA mediaPublic 1M May 25 09:41 Torrents
drwxr-xr-x 2 ServerA mediaPublic 1M May 24 22:19 TVShows
drwxr-xr-x 2 ServerA mediaPublic 1M Dec 20 12:12 Wallpapers
srv001
root@msc001x: /mnt/local/int001/MEDIA$ ls -l --block-size=K
total 104032K
drwxrws---+ 1 ServerA mediaPublic 1K Dec 16 22:07 Personal
-rwxrws--- 1 ServerA mediaPublic 104032K May 30 2017 plexmediaserver_1.7.2.3878-8088811b8_amd64.deb
drwxrwsr-x+ 1 ServerA mediaPublic 1K May 27 17:30 Public
srv001 - public sub folder
root@srv001:/mnt/local/int001/MEDIA/Public$ ls -l --block-size=M
total 527M
-rwxrwxr-x 1 ServerA mediaPublic 523M Oct 6 2017 archlinux-2017.10.01-x86_64.iso
drwxrwsr-x+ 1 ServerA mediaPublic 1M Jan 19 2017 Images
drwxrwsr-x+ 1 ServerA mediaPublic 1M May 25 09:41 Torrents
drwxrwsr-x+ 1 ServerA mediaPublic 1M May 24 22:19 TVShows
drwxrwsr-x+ 1 ServerA mediaPublic 1M Dec 20 12:12 Wallpapers
What is my problem. Firstly how, with the above Samba scenario, can I map the users so I can access the files as the correct user. Secondly, why is it mounting as 755 when it was originally 775 before mount.,
samba
edited May 30 at 7:26
asked May 27 at 14:02
aSystemOverload
322315
322315
UnlikeNFS
, theuid
andgid
don't need to be the same withsmb
. Did you set ansmb password
forUserA
andServerA
onsrv001
? Are you using those to connect to the share?
â Nasir Riley
May 27 at 14:34
@NasirRiley I am, I just changed it to a credential file and it acts the same way. Starts as 775 before mounting (mount point and remote directory), becomes 755 after mounting.
â aSystemOverload
May 27 at 15:02
Edit your question to include the output ofls -l
on the share before and after it's mounted.
â Nasir Riley
May 27 at 15:09
I've added the ls -l as requested./
â aSystemOverload
May 27 at 15:45
1
I'm still rather confused here. Yourfstab
says that the mountpoint ondesk001
is/mnt/remote/srv001/public
but then you runls -l
on/mnt/remote/msc001x/public/
which is a different directory. The directories onSrv001
show that the directories have sizes greater than zero and there is also a file calledarchlinux-2017.10.01-x86_64.iso
whereas the directories ondesk001
have sizes of0
andarchlinux-2017.10.01-x86_64.iso
is nowhere to be found. Also, what is/mnt/local/int001/MEDIA/Public$
underSrv001 - same folder
? I thought that the share wasmedia_public
?
â Nasir Riley
May 30 at 0:41
 |Â
show 5 more comments
UnlikeNFS
, theuid
andgid
don't need to be the same withsmb
. Did you set ansmb password
forUserA
andServerA
onsrv001
? Are you using those to connect to the share?
â Nasir Riley
May 27 at 14:34
@NasirRiley I am, I just changed it to a credential file and it acts the same way. Starts as 775 before mounting (mount point and remote directory), becomes 755 after mounting.
â aSystemOverload
May 27 at 15:02
Edit your question to include the output ofls -l
on the share before and after it's mounted.
â Nasir Riley
May 27 at 15:09
I've added the ls -l as requested./
â aSystemOverload
May 27 at 15:45
1
I'm still rather confused here. Yourfstab
says that the mountpoint ondesk001
is/mnt/remote/srv001/public
but then you runls -l
on/mnt/remote/msc001x/public/
which is a different directory. The directories onSrv001
show that the directories have sizes greater than zero and there is also a file calledarchlinux-2017.10.01-x86_64.iso
whereas the directories ondesk001
have sizes of0
andarchlinux-2017.10.01-x86_64.iso
is nowhere to be found. Also, what is/mnt/local/int001/MEDIA/Public$
underSrv001 - same folder
? I thought that the share wasmedia_public
?
â Nasir Riley
May 30 at 0:41
Unlike
NFS
, the uid
and gid
don't need to be the same with smb
. Did you set an smb password
for UserA
and ServerA
on srv001
? Are you using those to connect to the share?â Nasir Riley
May 27 at 14:34
Unlike
NFS
, the uid
and gid
don't need to be the same with smb
. Did you set an smb password
for UserA
and ServerA
on srv001
? Are you using those to connect to the share?â Nasir Riley
May 27 at 14:34
@NasirRiley I am, I just changed it to a credential file and it acts the same way. Starts as 775 before mounting (mount point and remote directory), becomes 755 after mounting.
â aSystemOverload
May 27 at 15:02
@NasirRiley I am, I just changed it to a credential file and it acts the same way. Starts as 775 before mounting (mount point and remote directory), becomes 755 after mounting.
â aSystemOverload
May 27 at 15:02
Edit your question to include the output of
ls -l
on the share before and after it's mounted.â Nasir Riley
May 27 at 15:09
Edit your question to include the output of
ls -l
on the share before and after it's mounted.â Nasir Riley
May 27 at 15:09
I've added the ls -l as requested./
â aSystemOverload
May 27 at 15:45
I've added the ls -l as requested./
â aSystemOverload
May 27 at 15:45
1
1
I'm still rather confused here. Your
fstab
says that the mountpoint on desk001
is /mnt/remote/srv001/public
but then you run ls -l
on /mnt/remote/msc001x/public/
which is a different directory. The directories on Srv001
show that the directories have sizes greater than zero and there is also a file called archlinux-2017.10.01-x86_64.iso
whereas the directories on desk001
have sizes of 0
and archlinux-2017.10.01-x86_64.iso
is nowhere to be found. Also, what is /mnt/local/int001/MEDIA/Public$
under Srv001 - same folder
? I thought that the share was media_public
?â Nasir Riley
May 30 at 0:41
I'm still rather confused here. Your
fstab
says that the mountpoint on desk001
is /mnt/remote/srv001/public
but then you run ls -l
on /mnt/remote/msc001x/public/
which is a different directory. The directories on Srv001
show that the directories have sizes greater than zero and there is also a file called archlinux-2017.10.01-x86_64.iso
whereas the directories on desk001
have sizes of 0
and archlinux-2017.10.01-x86_64.iso
is nowhere to be found. Also, what is /mnt/local/int001/MEDIA/Public$
under Srv001 - same folder
? I thought that the share was media_public
?â Nasir Riley
May 30 at 0:41
 |Â
show 5 more comments
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');
);
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%2funix.stackexchange.com%2fquestions%2f446316%2fno-read-write-on-samba-share%23new-answer', 'question_page');
);
Post as a guest
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
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
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
Unlike
NFS
, theuid
andgid
don't need to be the same withsmb
. Did you set ansmb password
forUserA
andServerA
onsrv001
? Are you using those to connect to the share?â Nasir Riley
May 27 at 14:34
@NasirRiley I am, I just changed it to a credential file and it acts the same way. Starts as 775 before mounting (mount point and remote directory), becomes 755 after mounting.
â aSystemOverload
May 27 at 15:02
Edit your question to include the output of
ls -l
on the share before and after it's mounted.â Nasir Riley
May 27 at 15:09
I've added the ls -l as requested./
â aSystemOverload
May 27 at 15:45
1
I'm still rather confused here. Your
fstab
says that the mountpoint ondesk001
is/mnt/remote/srv001/public
but then you runls -l
on/mnt/remote/msc001x/public/
which is a different directory. The directories onSrv001
show that the directories have sizes greater than zero and there is also a file calledarchlinux-2017.10.01-x86_64.iso
whereas the directories ondesk001
have sizes of0
andarchlinux-2017.10.01-x86_64.iso
is nowhere to be found. Also, what is/mnt/local/int001/MEDIA/Public$
underSrv001 - same folder
? I thought that the share wasmedia_public
?â Nasir Riley
May 30 at 0:41