Accessing Windows file-system from Linux samba server

View: New views
4 Messages — Rating Filter:   Alert me  

Accessing Windows file-system from Linux samba server

by Timothy Murphy-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't understand Windows permissions under Samba.
I am running an smb server under CentOS-5.4,
and have a Windows XP Pro machine ("harriet") as a client.

I have set up shares C and D on harriet
corresponding to the 2 drives C: and D: on the machine,
and I have asked that files should be shared.

Now when I mount harriet:C I can see
the top level folders,
but cannot see Documents and Settings\tim
although I can enter the All Users and Default User folders:
----------------------------------------
[tim@helen samba]$ sudo mount -t cifs harriet:C /mnt/win
Password:
[tim@helen samba]$ cd /mnt/win
[tim@helen win]$ cd Documents\ and\ Settings/
[tim@helen Documents and Settings]$ ls
All Users  Default User  deirdre  LocalService  NetworkService  roisin  tim
[tim@helen Documents and Settings]$ ls tim
ls: reading directory tim: Permission denied
[tim@helen Documents and Settings]$ ls Default\ User/
Application Data  Desktop    Local Settings  NetHood     NTUSER.DAT.LOG  
Recent  Start Menu
Cookies           Favorites  My Documents    NTUSER.DAT  PrintHood      
SendTo  Templates
[tim@helen Documents and Settings]$ ls All\ Users/
Application Data  Desktop  Documents  DRM  Favorites  Lx_cats  Start Menu  
Templates
----------------------------------------

I don't understand;
What do changes do I have to make to enter "tim"s folder;
and why amd I able to enter "Default User".

Any help or enlightenment gratefully received.

--
Timothy Murphy  
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: Accessing Windows file-system from Linux samba server

by Adam Nielsen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> [tim@helen samba]$ sudo mount -t cifs harriet:C /mnt/win

Since you're not specifying a username or password, you're connecting as
a Guest user.

> [tim@helen Documents and Settings]$ ls tim
> ls: reading directory tim: Permission denied

Obviously Guest isn't Tim :-)

> [tim@helen Documents and Settings]$ ls Default\ User/
> Application Data  Desktop    Local Settings  NetHood     NTUSER.DAT.LOG  
> Recent  Start Menu
> Cookies           Favorites  My Documents    NTUSER.DAT  PrintHood      
> SendTo  Templates

But Guest will need to know what the system defaults are.

> What do changes do I have to make to enter "tim"s folder;
> and why amd I able to enter "Default User".
>
> Any help or enlightenment gratefully received.

When you mount the share, specify a Windows username to connect as
(mount ... -o username=tim)

Cheers,
Adam.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: Accessing Windows file-system from Linux samba server

by Timothy Murphy-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Adam Nielsen wrote:

> When you mount the share, specify a Windows username to connect as
> (mount ... -o username=tim)

Thanks for your response.
But sadly, this does not make the slightest difference.
Incidentally, the machine is running Windows XP Pro,
and I am the Administrator.

I can browse in one share, but not the other,
although as far as I can see everything about them is identical,
except that they are on different drives:

-----------------------------------------
[root@helen ~]# mount -t cifs -o user=tim,password=****,rw  //harriet/EAGD
/mnt/win
[root@helen ~]# ls /mnt/win
The Sims 2
[root@helen ~]# umount /mnt/win
[root@helen ~]# mount -t cifs -o user=tim,password=****,rw  //harriet/EAGC
/mnt/win
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
-----------------------------------------

--
Timothy Murphy  
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: Accessing Windows file-system from Linux samba server

by Adam Nielsen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I can browse in one share, but not the other,
> although as far as I can see everything about them is identical,
> except that they are on different drives:

There must be some difference, otherwise it would work.

> [root@helen ~]# mount -t cifs -o user=tim,password=****,rw  //harriet/EAGC
> /mnt/win
> mount error 13 = Permission denied

Assuming the username and password are correct, the user you are
connecting as must not have access to this share.  IIRC you need to
grant a user access to both the share and (as you're probably using
NTFS) the folder/filesystem itself.

You could try connecting with smbclient instead, as it will probably
give you slightly more useful information.

Cheers,
Adam.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba