meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
common:mounting_shares [2009/02/24 15:34]
127.0.0.1 external edit
common:mounting_shares [2014/02/07 11:49] (current)
laakkone [How to Mount]
Line 1: Line 1:
-[[itlab|Back to #itlab main page]]+[[start|Back to #itlab main page]]
  
 =====  Migration to CIFS  ===== =====  Migration to CIFS  =====
Line 14: Line 14:
  
 If you really want to have the same UID/GID semantics as in smbfs, do this: If you really want to have the same UID/GID semantics as in smbfs, do this:
-<​code>​echo 0 > /​proc/​fs/​cifs/​LinuxExtensionsEnabled<​\/​code>​+ 
 +''​echo 0 > /​proc/​fs/​cifs/​LinuxExtensionsEnabled''​ 
 It disables the Unix extensions on client side. It disables the Unix extensions on client side.
  
Line 20: Line 22:
  
 The general form is: The general form is:
-''​mount.cifs ​<i>//​server/​share</i> <i>mountpoint</​i> ​-o noperms,user=LUT/<i>username</​i>''​+ 
 +<​code>​mount.cifs //​server/​share mountpoint -o noperm,​user=LUT/​username</​code>
  
 For umount you must use ''​umount.cifs''​ command. It seems to need the absolute path to mount point, For umount you must use ''​umount.cifs''​ command. It seems to need the absolute path to mount point,
 otherwise it leaves a stale entry in ''/​etc/​mtab''​. otherwise it leaves a stale entry in ''/​etc/​mtab''​.
 +
 +In Ubuntu, the command ''​mount.cifs''​ comes in the package ''​smbfs''​ (smb filesystem tools or such). Apparently it is not set-uid root by default, so you may need to use ''​sudo''​ with it. Using ''​sudo''​ makes the mounted files owned by root, so you need ''​noperms''​ options. It should be good to make it set-uid root, if you want to be able to mount as a regular user, or you do not want to use ''​noperms''​.
 +
 +The option ''​noperms''​ means, that the local file permissions are not used at all. The server will do permissions checking.
 +
 +===== File permissions =====
 +
 +If you need to check or change file permissions,​ use ssh to go to a machine, that has the share mounted via NFS. When you mount via CIFS on your workstation,​ the file permissions you see may have unknown user or group ids, or the permissions may be completely bogus (as with ''​noperms''​ option). Suitable servers are:
 +  * cursa.pc.lut.fi
 +  * laskenta1.it.lut.fi
 +  * laskenta2.it.lut.fi
 +
 +The path there is ''/​net/<​server>/<​share>/'',​ so e.g. <​code>​ssh cursa.pc.lut.fi
 +cd /​net/​www2/​projects
 +ls -l
 +</​code>​
  
 =====  Servers ​ ===== =====  Servers ​ =====
Line 43: Line 62:
 ====  pq's cmount script ​ ==== ====  pq's cmount script ​ ====
  
-http://​mediaserver.it.lut.fi/​media/​linux/​cmount+{{:common:​files:​cmount.doc}} (Download and rename to ''​cmount''​ and set execute permission.)
  
-The script ​has server ​configuration inside ​it, and the shares come from directory structure. Here is an example ​directory structure:+Note, that in the script ​''​www2.it.lut.fi''​ is called just ''​server'',​ since it really is **the** server. 
 + 
 +Put ''​cmount''​ to a directory, e.g. ''​$HOME/​net''​, and create ​the following ​directory structure ​under it:
 <​code>​ <​code>​
 . .
-|-- diso 
-|   |-- kurssit 
-|   |-- project 
-|   `-- www 
 |-- files-tite |-- files-tite
 |   |-- HOME |   |-- HOME
 |   `-- tite |   `-- tite
-|-- mediaserver +|-- server 
-|   `-- media +|   |-- projects 
-|-- regulus +|   |-- software 
-|   ​|-- ​project +|   ​|-- ​temp 
-|   ​`-- ​users+|   ​`-- ​www
 `-- ti500433 `-- ti500433
     `-- install     `-- install
-<\/code> +</​code>​ 
-Mounting works by ''​./​cmount ​diso/www''​ and umounting must be done by ''​./​cmount -u diso/www''​ or otherwise the mount may not be removed properly from ''​mtab''​ even though it is really unmounted.+ 
 +Mounting works by ''​./​cmount ​server/projects''​ and umounting must be done by ''​./​cmount -u server/projects''​ or otherwise the mount may not be removed properly from ''​mtab''​ even though it is really unmounted. You can mount read-only with ''​./​cmount -r server/​projects''​.