How to map network drive ??

Gavin McCullagh gmccullagh at gmail.com
Fri Jan 25 10:42:16 GMT 2008


Hi,

On Thu, 24 Jan 2008, oedha at netscape.net wrote:

> i insert /etc/fstab with --> 
> 
> //192.168.1.100/shared /media/x cifs rw,uid=root,gid=users,file_mode=0775,dir_mode=0775 
> 0 0
> then :
> 
> oedha at The-ELF:/media$ sudo mount -a
> Password: 

You had unmounted it first, right?  If not, try again, but unmount it first.

> oedha at The-ELF:/media$ sudo touch /media/x/testfile
> oedha at The-ELF:/media$ ls -l x
> total 27364
> -rwxr--r--? 1 root users 27983360 2008-01-25 08:31 20080124-005-x86.exe
> drwxr-xr-x? 9 root users??????? 0 2008-01-24 07:29 Free_to_take
> drwxr-xr-x? 8 root users??????? 0 2008-01-23 10:20 Linux
> drwxr-xr-x? 9 root users??????? 0 2008-01-24 16:55 LRC
> drwxr-xr-x? 2 root users??????? 0 2008-01-24 17:32 MUSIC
> drwxr-xr-x? 6 root users??????? 0 2008-01-18 15:59 PEKSIPEL
> drwxr-xr-x 43 root users??????? 0 2008-01-25 08:09 PICTURES
> -rwxr--r--? 1 root users???? 1060 2007-11-05 10:30 ReadMe_First_X_.txt
> drwxr-xr-x 21 root users??????? 0 2008-01-24 17:47 Students_Files
> drwxr-xr-x 31 root users??????? 0 2008-01-24 16:48 Teachers_Files
> -rw-r--r--? 1 root users??????? 0 2008-01-25 09:14 testfile
> drwxr-xr-x? 8 root users??????? 0 2007-12-04 18:01 TP7
> drwxr-xr-x? 5 root users??????? 0 2008-01-21 14:18 VIDEOS
> drwxr-xr-x? 3 root users??????? 0 2008-01-24 17:51 X_CIT
> drwxr-xr-x? 3 root users??????? 0 2008-01-25 09:12 XI_CIT
> drwxr-xr-x? 9 root users??????? 0 2008-01-22 09:59 XII_CIT

That's quite strange.  The file_mode=0775,dir_mode=0775 should, if I
understand correctly, set the permissions to be rwxrwxr-x which would allow
members of users to write files.  Directories seem to be rwxr-xr-x and
files seem to vary a little.

Ah.  Looking at the manpage for mount.cifs (which is what you're using with
CIFS), you might need to add the option noperms.

//192.168.1.100/shared /media/x cifs //rw,uid=root,gid=users,file_mode=0775,dir_mode=0775,noperm 0 0

       noperm
	   Client does not do permission checks. This can expose files on
	   this mount to access by  other  users  on  the local client
	   system. It is typically only needed when the server supports the
	   CIFS Unix Extensions but the UIDs/GIDs on the client and server
	   system  do not match  closely enough to allow access by the user
	   doing the mount.  Note that this does not affect the normal ACL
	   check on the target machine done by the  server software  (of
	   the  server ACL against the user name provided at mount time).

If you have ldap or nis set up so that the server and clients have
corresponding users, it probably wouldn't make sense to do this but it
sounds like you probably don't.

Gavin




More information about the edubuntu-users mailing list