I am having trouble trying to get theh permissions for some of my external drives set up.
I believe the probem is due to how I am dealing with spaces in the text such that the commands can be interpreted by the terminal.
I have found this, which seems to indicate that I need to configure my etc/fstab file to show the following:
# UNCONFIGURED FSTAB FOR BASE SYSTEM
/host/ubuntu/disks/swap.disk none swap sw 0 0
LABEL='Expansion Drive' /media/'Expansion Drive' ntfs-3g defaults,umask=0022,fmask=0133 0 0
LABEL='Expansion Drive_' /media/'Expansion Drive_' ntfs-3g defaults,umask=0022,fmask=0133 0 0
However, This is showing an error that the drive Drive_' is not ready. I realize that this is due to using ""s or ''s, but I am not sure how else to do this properly. My 2 drives are called Expansion Drive and Expansion Drive_ . Anyone know how to solve this problem?
EDIT: Here is what I can see in the media folder:
chasebrown@ubuntu:/media$ ls -al
total 32
drwxr-xr-x 6 root root 1024 Mar 9 16:32 .
drwxr-xr-x 24 root root 1024 Feb 23 23:14 ..
drwx------ 1 chasebrown chasebrown 4096 Mar 8 04:21 Expansion Drive
drwx------ 1 chasebrown chasebrown 4096 Mar 8 04:21 Expansion Drive_
dr-x------ 1 chasebrown chasebrown 2048 May 20 2009 GDRV-25922+VR2
drwx------ 1 chasebrown chasebrown 20480 Mar 8 04:21 WD EXTERNAL
# UNCONFIGURED FSTAB FOR BASE SYSTEM
/host/ubuntu/disks/swap.disk none swap sw 0 0
LABEL=Expansion\040Drive /media/Expansion\040Drive ntfs-3g defaults,umask=0022,fmask=0133 0 0
LABEL=Expansion\040Drive_ /media/Expansion\040Drive_ ntfs-3g defaults,umask=0022,fmask=0133 0 0
SOLUTION:
I ended up changing the LABEL to UUID and it worked for some reason.
Here is the resulting /etc/fstab file was :
# UNCONFIGURED FSTAB FOR BASE SYSTEM
/host/ubuntu/disks/swap.disk none swap sw 0 0
UUID=C682A8EE82A8E3E1 /media/Expansion\040Drive ntfs-3g defaults,umask=0022,fmask=0133 0 0
UUID=D006D78406D769CC /media/Expansion\040Drive_ ntfs-3g defaults,umask=0022,fmask=0133 0 0
解决方案
You can use the escape sequence \040 to escape spaces:
# UNCONFIGURED FSTAB FOR BASE SYSTEM
/host/ubuntu/disks/swap.disk none swap sw 0 0
LABEL=Expansion\040Drive /media/Expansion\040Drive ntfs-3g defaults,umask=0022,fmask=0133 0 0
LABEL=Expansion\040Drive_ /media/Expansion\040Drive_ ntfs-3g defaults,umask=0022,fmask=0133 0 0
BTW, you cannot quote part of the string like you mentioned in the question. If you're quoting, you need to quote the entire string.
Another thing I happen to notice from the output of blkid is that there are 2 partitions (on 2 separate drives sdc1 and sdd1) both having the same LABEL Expansion Drive. To workaround this, you can use UUID instead.