Mount ext3 partition in /home/USER/Documents with read/write/execute acces for USER
I have an Serial ATA HARDDISK, and I AM able mount it as a root. I can even add it to my /etc/fstab using the following line in the file:
/dev/sda1 /home/herbert/Documents ext3 user,rw,auto,exec,async 0 0
And I can access the drive. Although only as a root. I would like it to be accessible for a normal user. Could someone help me? Thanks so far.
By the way, the following doesn't work either:
/dev/sda1 /home/herbert/Documents ext3 user,gid=100,uid=500,umask=077 0 0
Herbert:/home/herbert/Desktop/Temp # mount /dev/sda1
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Well it is a ext3 filesystem and it is a valid one to, because otherwise "/dev/sda1 /home/herbert/Documents ext3 user,rw,auto,exec,async 0 0" wouldn't work in the first time.
Could someone indicate the bad option? Thank you.
Thank you for your time,
I don't believe ext3 uses the uid, gid, or umask mount options.
See the mount manpage, it lists the common and filesystem-specific mount options.
Thank you for your help, but I already solved the problem using some forums I found under my post. I will describe what I did in total for others who have the same problem.
FIRST INSTALL THE HARDDRIVE.
o I think you did that already,put it into your computer,
and connect all the cables (in case of SATA only use one
way to give your harddrive electricity, using both will
kill your harddrive).
MAKE A MOUNTPOINT
o The mountpoint will be the folder where you can access
o Go to the place where you would like the mountpoint to
be. This means you have to do this by going to a
directory. This may be both in Console or Filemanager
o In my case I went to /home/herbert
o I don't want the files to be mounted In /home/herbert,
but in /home/herbert/Documents. This folder already
exists, because it was made during the installation
o IN CASE THE FOLDER ALREADY EXISTS BACKUP FILES IN THAT
o Now you should be sure that there is a directory where you
would like to mount your files.
SET THE MOUNTPOINT
o Setting the mointpoint will ask from you to know a
texteditor. In SuSE Linux I use kate. Start it by
starting a root-console and using the following
command (without # in front):
# kate /etc/fstab
o Note: YOU CAN ONLY OPEN /etc/fstab WITH
o A file will be opened in a graphical text-editor.
You should add a line, be sure to not delete one.
Note: IF YOU AXCIDENTLY REMOVED A LINE CLOSE
WITHOUT SAVING AND START AGAIN!
o The line should be like this:
/dev/sda1 /home/herbert/Documents ext3 auto,owner,users,rw 0 1
o This will mount at startup (due to auto-option) the drive sda1
(due to /dev/sda1) with ext3 filesystem (due to 'ext3' part)
at mountpoint /home/herbert/Document (due to you know...).
o NOW your harddrive should mount when you restart your
computer, but you can also avoid restarting using the
# mount /dev/sda1
o Your harddrive should now be mounted. It is still not
accessible for you.
MAKING THE HARDDRIVE ACCESSIBLE.
o First I recommend you change the owner of the mountpoint
into the one that should access it. But you can also make
it accessible for 'the world' (I don't know how literally
this should be taken, but I wouldn't recommend making it
accessible for the world.
o Note: only do one of the two following sections.
MAKING IT ACCESSIBLE FOR 'THE WORLD'
o Open a root-console and go to the mountpoint. e.g.:
# cd /home/herbert/Documents
o Type the following to make it available for everyone:
# chmod -R 777 *
o !!!I DONOT RECCOMMEND DOING THIS!!!!
MAKE IT LESS ACCESSIBLE
o Open a root-console and go to the parentdirectory of the mountpoint. e.g.:
# cd /home/herbert/
o Change the owner of the mointpoint by:
# chown -R herbert Documents
o Note: The new owner is now herbert.
o go to mountpoint, e.g. by:
# cd /home/herbert/Documents
o Change the permissions e.g. like this (SEE WARNING BELOW):
# chmod -R 700 *
o You should have access now, but in case you don't extend the accessibility by:
# chmod -R 770 *
YOU SHOULD BE FINISHED NOW: STILL QUESTIONS? MAKE A TOPIC OR MAIL ME.
!!!!WARNING THE CODE 700 makes all your home-directory files executable!!!!
|All times are GMT -5. The time now is 08:26 PM.|