Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > Your Distro > Debian Linux Help
Reload this Page fstab issue, permissions issue with mount
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Debian Linux Help Discussions related to Debian GNU/Linux.

Reply
 
Thread Tools Display Modes
Old 01-11-2007   #11 (permalink)
Just Joined!
 
Join Date: Jan 2007
Posts: 11
the uid and gid were both 1000 so i set that and tried to mount it but i got the following error

mount: wrong fs type, bad option, bad superblock on /dev/hdc1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

so then i rebooted the system and the drive didn't mount. I tried mounting it again with "mount -a" and it gave the same error.
hyeteck is offline   Reply With Quote
Old 01-11-2007   #12 (permalink)
Just Joined!
 
Join Date: Jan 2007
Posts: 11
after getting that error i did a "dmesg tail" and i got the following output for the related issue

EXT3-fs: Unrecognized mount option "uid=1000" or missing value
hyeteck is offline   Reply With Quote
Old 01-11-2007   #13 (permalink)
Linux Enthusiast
 
likwid's Avatar
 
Join Date: Dec 2006
Location: MA
Posts: 649
What are the permissions of the /mnt/maxtor directory before you mount the drive? Do you have RSBAC or SeLinux?
likwid is offline   Reply With Quote
Old 01-11-2007   #14 (permalink)
Just Joined!
 
Join Date: Jan 2007
Posts: 11
I am not sure what RSBAC and SeLinux are but i can read and write to the /mnt/maxtor directory both with root and as user before mounting the drive there.

i even created a maxtor directory in my home directory and tried mounting it there and have the same issues.

Could it be an issue with the drive? i used gparted live cd to partition and format it.
hyeteck is offline   Reply With Quote
Old 01-11-2007   #15 (permalink)
Linux Enthusiast
 
likwid's Avatar
 
Join Date: Dec 2006
Location: MA
Posts: 649
Quote:
Originally Posted by devils_casper
add this code in /etc/fstab file.
Code:
/dev/hdc1     /mnt/maxtor    ext3    defaults 0 0
execute 'mount -a' after editing fstab file.







Casper
If it's already mounted he's going to have to execute mount -o remount /device after editing fstab. He should add that line to fstab and type

mount -o remount /mnt/maxtor


Default umask is not going to let anything other than root uid write to the drive. You have to add the uid or gid option so it's mounted under your user, or you have to create a directory as root on the drive, then set proper permissions.
likwid is offline   Reply With Quote
Old 01-11-2007   #16 (permalink)
Linux User
 
gruven's Avatar
 
Join Date: Dec 2004
Location: Arkansas
Posts: 380
Send a message via ICQ to gruven Send a message via AIM to gruven Send a message via MSN to gruven Send a message via Yahoo to gruven Send a message via Skype™ to gruven
If I recall, umask only applies to ntfs and fat drives. uid and gid may only work on those, but I am not sure.

If you want to have read/write access from a normal user, then after the drive is mounted, you will have to chown or chmod the drive.

I would create a group that has write access to the drive, and then chown the drive to root:whatever group, chmod 770, and then add your user to that group.

Or, you could just chown the drive to your user, if you are the only one on that computer.

Make sure the drive is mounted when you do the chown, or it won't carry over to the new filesystem.

Then, you can just mount it normally in fstab, with no special options.

I have found that for ext2/3 and other linux file systems, that is about the only way to do it.
__________________

Linux User #376741
Gentoo Linux
gruven is offline   Reply With Quote
Old 01-11-2007   #17 (permalink)
Just Joined!
 
Join Date: Jan 2007
Posts: 11
how do u create a new group and give the group write access to that drive?
hyeteck is offline   Reply With Quote
Old 01-11-2007   #18 (permalink)
Linux User
 
gruven's Avatar
 
Join Date: Dec 2004
Location: Arkansas
Posts: 380
Send a message via ICQ to gruven Send a message via AIM to gruven Send a message via MSN to gruven Send a message via Yahoo to gruven Send a message via Skype™ to gruven
If you aren't comfortable using cli, then both kde and gnome can do this for you.

I believe that it is under the "Users and Groups" menu selection on both, but not sure.

If you want to do it the cli way, then you would (as root):
Code:
#groupadd foo
#chown root:foo /mnt/maxtor
#chmod 770 /mnt/maxtor
#
#usermod -G <comma separated group list> <user id> (you can manually edit /etc/groups to 
add your user to the group instead of using usermod, because using usermod, you will have to 
list all groups that the user is a member of as it is an absolute list, not an append-to.  
If you leave out a group, that member will be taken out of the group you leave out.
Here is a link that will help you:
http://www.yolinux.com/TUTORIALS/Lin...ingGroups.html
The link will explain everything to you.
It will be a lot easier if you want to use the gui, as you can just click on the group, and click edit, and add your user.
__________________

Linux User #376741
Gentoo Linux
gruven is offline   Reply With Quote
Old 01-11-2007   #19 (permalink)
Just Joined!
 
Join Date: Jan 2007
Posts: 11
thanks...i'll give this a try tonight and see how it goes.
hyeteck is offline   Reply With Quote
Old 01-12-2007   #20 (permalink)
Super Moderator
 
devils casper's Avatar
 
Join Date: Jun 2006
Location: Chandigarh, INDIA
Posts: 18,411
Quote:
Originally Posted by likwid
If it's already mounted he's going to have to execute mount -o remount /device after editing fstab. He should add that line to fstab and type

mount -o remount /mnt/maxtor
this command is for partitions having 'noauto' option set.
if you use 'defaults' option in fstab file then 'mount -a' command will remount partition.





Casper
__________________
New Users: Read This First


devils casper is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 04:27 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0