2

I can successfully mount a windows share over the network from my Raspberry/Jessie with both, mount.cifs and fstab entrye then mount -a.

E.g. sudo mount.cifs //HPSERVER/linux-bup/ /home/maxg/bmsOnSrvr -v -o user=linux,pass=****

However, when I want to write to that Windows share I get Permission denied. I can read the files on the share.

This is what I can see on the linux machine:

# [2018-04-17 21:13] maxg@rpi32 ~/bmsOnSrvr $
la
total 5
drwxr-xr-x 2 root root    0 Apr 17 21:04 .
drwxr-xr-x 8 maxg maxg 4096 Apr 17 19:15 ..
-rwxr-xr-x 1 root root    4 Apr 17 21:04 deleteme.txt
-rwxr-xr-x 1 root root    0 Apr  8 11:50 desktop.ini
drwxr-xr-x 2 root root    0 Apr 17 19:15 rPi32

Th windows share allows the user 'linux' full access, as can be seen by using CACLS:

C:\>cacls d:\shares\linux-bup
d:\shares\linux-bup BUILTIN\Administrators:(OI)(CI)F
                CREATOR OWNER:(OI)(CI)(IO)F
                Everyone:(OI)(CI)F
                HPSERVER\linux:(OI)(CI)F
                NT AUTHORITY\SYSTEM:(OI)(CI)F

C:\>cacls d:\shares\linux-bup\rPi32
d:\shares\linux-bup\rPi32 BUILTIN\Administrators:(OI)(CI)F
                      CREATOR OWNER:(OI)(CI)(IO)F
                      Everyone:(OI)(CI)F
                      HPSERVER\linux:(OI)(CI)F
                      NT AUTHORITY\SYSTEM:(OI)(CI)F

D:\shares\linux-bup>echo . >deleteme.txt

D:\shares\linux-bup>cacls d:\shares\linux-bup\deleteme.txt
d:\shares\linux-bup\deleteme.txt BUILTIN\Administrators:F
                             Everyone:F
                             HPSERVER\linux:F
                             NT AUTHORITY\SYSTEM:F

I am out of ideas, as to why I have no access. What else do I need to get access?

3

Further digging revealed a noperm parameter that can be used on the mount command:

sudo mount.cifs //HPSERVER/linux-bup/ /home/maxg/bmsOnSrvr --v -o user=linux,pass=****,noperm

result now:

# [2018-04-17 21:45] maxg@rpi32 ~/bmsOnSrvr $
la
total 5
drwxr-xr-x 2 root root    0 Apr 17 21:04 .
drwxr-xr-x 8 maxg maxg 4096 Apr 17 19:15 ..
-rwxr-xr-x 1 root root    4 Apr 17 21:04 deleteme.txt
-rwxr-xr-x 1 root root    0 Apr  8 11:50 desktop.ini
drwxr-xr-x 2 root root    0 Apr 17 19:15 rPi32
# [2018-04-17 21:45] maxg@rpi32 ~/bmsOnSrvr $
echo kjskjs>max.txt
# [2018-04-17 21:45] maxg@rpi32 ~/bmsOnSrvr $
rm desktop.ini
# [2018-04-17 21:45] maxg@rpi32 ~/bmsOnSrvr $
la
total 5
drwxr-xr-x 2 root root    0 Apr 17  2018 .
drwxr-xr-x 8 maxg maxg 4096 Apr 17 19:15 ..
-rwxr-xr-x 1 root root    4 Apr 17 21:04 deleteme.txt
-rwxr-xr-x 1 root root    7 Apr 17 21:45 max.txt
drwxr-xr-x 2 root root    0 Apr 17 19:15 rPi32

[edit] However, it looks like this is the proper way of doing it:

sudo mount.cifs //HPSERVER/linux-bup/ /home/maxg/bmsOnSrvr --v -o user=linux,pass=****,uid=1001,gid=1001

result now:

# [2018-04-17 21:59] maxg@rpi32 ~/bmsOnSrvr $
la
total 4
drwxr-xr-x 2 maxg maxg    0 Apr 17 21:50 .
drwxr-xr-x 8 maxg maxg 4096 Apr 17 19:15 ..
drwxr-xr-x 2 maxg maxg    0 Apr 17 19:15 rPi32
# [2018-04-17 21:59] maxg@rpi32 ~/bmsOnSrvr $
echo crap>crap.txt
# [2018-04-17 21:59] maxg@rpi32 ~/bmsOnSrvr $
la
total 5
drwxr-xr-x 2 maxg maxg    0 Apr 17 22:00 .
drwxr-xr-x 8 maxg maxg 4096 Apr 17 19:15 ..
-rwxr-xr-x 1 maxg maxg    5 Apr 17 21:59 crap.txt
drwxr-xr-x 2 maxg maxg    0 Apr 17 19:15 rPi32
  • uid and gid likely need to come from id -u <username> and id -g <username>. Or at least that's what I did based on this answer, and it worked :) . – Rob Oct 7 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.