Author Topic: Mounting LinkShare 210 with Debian linux 11  (Read 513 times)

ladydeath2021

  • Calf
  • *
  • Posts: 1
Mounting LinkShare 210 with Debian linux 11
« on: December 08, 2021, 11:40:46 AM »
Mounting a LinkShare 210 using Debian linux 11 and the command:

mount -t cifs //192.168.1.57/share /buffalo -o vers=2.0,guest

does mount the drive to /buffalo, however, it changes the permissions from 0777 to 0755 making it read only from any user except root.  Is there a way to change that so I can have read write access from any user?  Basically keeping the permissions at 0777.

Another example is when using Clonezilla (debian linux based) to perform a backup of a system I get the same problem.  The drive is mounted as read only.

1000001101000

  • Debian Wizard
  • Big Bull
  • *****
  • Posts: 1128
  • There's no problem so bad you cannot make it worse
Re: Mounting LinkShare 210 with Debian linux 11
« Reply #1 on: December 10, 2021, 11:18:47 AM »
It's a somewhat complicated topic though I think what you need can be handled fairly simply.

One of the things that CIFS gets from the "Windows" share is ownership/permission information which works a bit differently on Windows than Linux. I believe by default it just treats everything as owned by root, or rather by whoever ran the mount command which would be root in this and most other cases.

There are a number of options you can add to adjust this behavior. I think the simplest is to add the uid and/or gid so that the files will be owned by whatever user you would prefer. There are also options for mapping samba users to real users and/or having both systems use a shared kerberos authentication setup etc. I haven't gotten very deep into it personally but there are a lot of options.
 
see: https://linux.die.net/man/8/mount.cifs

For Linux->Linux connections I recommend using NFS which can make your life much easier since you won't run into as many weird issues with character encoding/links/permissions issues.