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
Last revision Both sides next revision
common:mounting_shares [2009/04/02 09:49]
laakkone moving files from mediaserver to www2 wiki
common:mounting_shares [2011/09/02 12:04]
127.0.0.1 external edit
Line 27: Line 27:
 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 46: Line 62:
 ====  pq's cmount script ​ ==== ====  pq's cmount script ​ ====
  
 +{{:​common:​files:​cmount.doc}} (Download and rename to ''​cmount''​ and set execute permission.)
  
-{{:​common:​files:​cmount.zip}} (download and unzip) +Note, that in the script ​''​www2.it.lut.fi''​ is called just ''​server''​since it really is **the** server.
- +
-The script ​has server configuration inside ​it, and the shares come from directory structureHere is an example directory structure:+
  
 +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''​.