No Read-Write on Samba Share

The name of the pictureThe name of the pictureThe name of the pictureClash 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.,







share|improve this question





















  • 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










  • 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 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















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.,







share|improve this question





















  • 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










  • 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 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













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.,







share|improve this question













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.,









share|improve this question












share|improve this question




share|improve this question








edited May 30 at 7:26
























asked May 27 at 14:02









aSystemOverload

322315




322315











  • 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










  • 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 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

















  • 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










  • 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 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
















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
















active

oldest

votes











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',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















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



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














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













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay