[SOLVED] Re: samba: mounting as cifs not working (works in Windows though)



On 01/08/10 02:52 AM, Tom H wrote:
On Sat, Jul 31, 2010 at 1:45 PM, H.S.<hs.samix@xxxxxxxxx> wrote:
On 29/07/10 02:23 PM, Stephan Seitz wrote:

On Wed, Jul 28, 2010 at 11:11:31AM -0400, H.S. wrote:

~$ sudo mount -v -t cifs -o user=<username> //sambaserver/Share
~/mnt/Share
Password: ....<username's password here> ....
mount.cifs kernel mount options:

ip=192.168.0.8,unc=//sambaserver/Share,,ver=1,user=<username>,pass=********

mount error(13): Permission denied

Stupid question, but from what I remember using mount.smbfs and
mount.cifs (when it could be run by a normal user because of s-bit), the
target directory must belong to the user doing the mount call.

I don’t know, what directory owner is required if you do the command via
sudo, but what permissions has ~/mnt/Share?

Just to try this I created a new directory (on the server):
drwxr-xr-x 2 hs hs 4096 Jul 29 14:29 testsamba

and the relevant stanze in smb.conf:
[testsamba]
comment = Test Samba share
browsable = yes
guest ok = no
path = /mnt/testsamba
writable = yes
force create mode = 0770
force directory mode = 0775

Restarted samba but I am getting the same error (mount error(13): Permission
denied) on the client.

Run
mkdir /home/hs/testsamba
tail -f /var/log/messages
on the client and try both
mount -v -t cifs //192.168.0.8/testsamba /home/hs/testsamba -o
domain=smbwg,username=hs,password=<password>,port=139
mount -v -t cifs //192.168.0.8/testsamba /home/hs/testsamba -o
domain=smbwg,username=hs,password=<password>,port=445

That solved the problem!

I did as you suggested and it worked. Then I compared the directories I had in my $HOME/mnt that I use for mounting samba shares. My ~/mnt was:
drwx--x--- 8 hs hs 4096 Jul 12 12:18 .
drwxr-x--x 83 hs hs 4096 Aug 1 09:19 ..
drwx--x--- 2 hs hs 4096 Nov 1 2009 Share


Changed them with "chmod -R o+X ~/mnt" and I have these now:
drwx--x--x 8 hs hs 4096 Jul 12 12:18 .
drwxr-x--x 83 hs hs 4096 Aug 1 09:19 ..
drwx--x--x 2 hs hs 4096 Nov 1 2009 Share


Now my earlier commands also work. e.g.
$> sudo mount -v -t cifs //192.168.0.8/Share /home/hs/mnt/Share -o user=hs

So the solution was that the mount point I have must be executable by all.

Thank you!

--

Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/i33voc$82i$1@xxxxxxxxxxxxxxx



Relevant Pages

  • Re: NFS AIX 5.3 (5300-04-00) & Windows 2003 STD SP1
    ... Not set user mapping - only set IP permissions - no nided user mapping and ... change permission for folder c:\ ... mount: 1831-008 giving up on: ... Folder permission: ...
    (comp.unix.aix)
  • Re: mounting ext3 drive with R/W permission???
    ... thanks for nice suggestion. ... permission to full for that mount point. ... but cant access it as normal user but only as root user. ...
    (Fedora)
  • Re: mounting ext3 drive with R/W permission???
    ... permission to full for that mount point. ... I mounted the drive with my fstab entry as: ... but cant access it as normal user but only as root user. ... I forgot to change the permission recursively. ...
    (Fedora)
  • Re: Cant Mount my USB Disk R/W [Was Slow USB disk]
    ... /etc/fstab, what does the mount command you are using look like, etc. ... ^ Group write permission ... To mount it I do (as root or as user) mount /dev/sdb1, ... I don't run kde so have no idea how you would fix it. ...
    (Debian-User)
  • Re: Trouble with mounting USB stick as user
    ... AFAIK, only root can mount things under FreeBSD, period. ... The user must have read+write permission on the device ... Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing ...
    (freebsd-stable)