LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 01-12-2007, 11:33 AM   #1
anonymous234
LQ Newbie
 
Registered: Jan 2007
Posts: 5

Rep: Reputation: Disabled
Question Mount ext3 partition in /home/USER/Documents with read/write/execute acces for USER


Dear reader,

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:

FSTAB-FILE:

/dev/sda1 /home/herbert/Documents ext3 user,gid=100,uid=500,umask=077 0 0

ROOT-CONSOLE:

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,
 
Old 01-12-2007, 12:46 PM   #2
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
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.
 
Old 01-12-2007, 01:23 PM   #3
anonymous234
LQ Newbie
 
Registered: Jan 2007
Posts: 5

Original Poster
Rep: Reputation: Disabled
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
the files.
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
(Like konqueror).
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
of linux.
o IN CASE THE FOLDER ALREADY EXISTS BACKUP FILES IN THAT
FOLDER
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
ROOT-PERMISSIONS
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
command:

# 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!!!!

Enjoy linux,

Last edited by anonymous234; 03-04-2007 at 10:32 AM.
 
  


Reply

Tags
linux, uses


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i read and write to a ext3 partition from windows saini_mw Linux - Software 6 04-19-2006 03:07 AM
User write permissions on ext3 partition darin3200 Linux - General 4 05-30-2005 09:27 AM
How can I do an automated Read/Write SMB mount for a normal user? molear Linux - Newbie 1 07-01-2004 03:45 PM
Read/Write access ext3 partition st00 *BSD 5 06-28-2004 09:46 PM
user can't read/write (vfat) partition MykilX Slackware 6 07-04-2003 06:32 PM


All times are GMT -5. The time now is 03:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration