I want to mount a USB disk at startup.
My directory “Documents” in my home folder is soft linked to the directory “Documents” on the external hard disk, so that I can use my documents on several computers.
I made a directory in mnt “DOCU” and an entry in fstab “LABEL=DOCU /mnt/DOCU ntfs rw,user,exec,suid” (and yes all my entries in fstab are with LABEL=); set the permissions to 666.
The filesystem of the external hd is ntfs. I use openSUDE 13.1 , Kubuntu 13.10, Windows XP, and Windows 8.1
I have some programs which only work in MSWindows, programs to program PLC’s (Siemens S7-1200, Siemens Logo! ans Schneider Zelio)
On 2013-11-18 21:56, cduf wrote:
>
> Hello,
>
> I want to mount a USB disk at startup.
> My directory “Documents” in my home folder is soft linked to the
> directory “Documents” on the external hard disk, so that I can use my
> documents on several computers.
>
> I made a directory in mnt “DOCU” and an entry in fstab “LABEL=DOCU
> /mnt/DOCU ntfs rw,user,exec,suid” (and yes all my entries in fstab
> are with LABEL=); set the permissions to 666.
Well, that how I would do it. Is it not working, do you get an error?
Symptoms?
Can you post your fstab file? Do it inside a code tags section - use the
‘#’ button in the editor.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
My normal suggestion for mounting hard drives is to NOT use any preexisting folder names unless it is in my /home/username area. For mounts outside of /home, I use such folder names from root as /Windows, /Software, /Backup and /DataSave. I don’t think using 666 Permissions for this folder is a problem, but I hate using the number 666 and normally just go with 777 for my folder mounts. I normally use the disk/by-id to name the hard drive which you can determine by looking at it in the YaST Partitioner. Other things when mounted in the fstab include options of nofail & defaults. Here is an example of my fstab mount.
a mountpoint like /data/DOCU and adjusted symlink, rather than having to change the permissions of a system folder (/mnt) or have something mounted in that folder permanently.
Changing permissions doesn’t work on NTFS, plus “666” for folders means you can’t enter them: 666 = rw-rw-rw-. Try with a test folder. “666” is wrong anyway, the last “6” is “rest of the world”, you don’t want that.
Normally, if I share a local mount with Samba, I do use permissions of 777 and defaults for the ntfs drive partition. This does allow all users to have read/write access locally and remotely to this drive. If you want tighter control, then it is assumed you know how to do that. On a local area network, I don’t have a problem with this setup.
> /Software, /Backup and /DataSave. I don’t think using 666 Permissions
> for this folder is a problem, but I hate using the number 666 and
> normally just go with 777 for my folder mounts. I normally use the
You can not set permissions that way on an ntfs partition, they do not
work. You have to use instead “fmask=…,dmask=…” as mount options.
Look:
cer@minas-tirith:/windows/C/Users/Cer> touch p
cer@minas-tirith:/windows/C/Users/Cer> l p
-rw-rw---- 1 root users 0 Nov 18 23:09 p
cer@minas-tirith:/windows/C/Users/Cer> chmod o+r p
chmod: changing permissions of `p': Operation not permitted
cer@minas-tirith:/windows/C/Users/Cer> chmod u-r p
chmod: changing permissions of `p': Operation not permitted
cer@minas-tirith:/windows/C/Users/Cer> su
Password:
minas-tirith:/windows/C/Users/Cer # chmod o+r p
minas-tirith:/windows/C/Users/Cer # l p
-rw-rw---- 1 root users 0 Nov 18 23:09 p
minas-tirith:/windows/C/Users/Cer #
The permission can not be set even as root.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
I am talking about the folder name created in the linux root / drive which is NOT located on the NTFS partition. I do not mess with permissions on the NTFS partition. This all has to do with giving full r/w access to the partition to all users.
> I am talking about the folder name created in the linux root / drive
> which is NOT located on the NTFS partition. I do not mess with
> permissions on the NTFS partition. This all has to do with giving full
> r/w access to the partition to all users.
I see.
But you need adjusting both, the folder and the contents, to allow
permissions. The “defaults” usually work.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)