LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-14-2005, 06:35 AM   #1
faithman2k
LQ Newbie
 
Registered: Jun 2005
Distribution: Mepis
Posts: 6

Rep: Reputation: 0
Problem writing to storage hard disk as user


Hi all.

I've been using Mepis for the last 2 weeks and it's been a great experience so far.

I have encountered a problem and I've looked everywhere (google, mepis and other forums) to try and find a solution but I think it's beyond my current level of linux understanding.

When I mount my hdb4 (ext3) partition it will not allow me to write to it as user, only as root.

When I try to change the permissions using the "gui tools" available in Mepis, I get

"changing the attributes of files is not supported with protocol devices"

I get the same response in root too.

If anyone can help me, here is my etc/fstab file

Code:
# Static entries below, do not use 'users' option in this area
/dev/hdb1 / ext3 defaults,noatime 1 1
none /proc proc defaults 0 0
none /proc/bus/usb usbfs devmode=0666 0 0
none /dev/pts devpts mode=0622 0 0
none /sys sysfs defaults 0 0
/dev/hdb3 /home ext3 defaults,noatime 1 2
# Dynamic entries below, identified by 'users' option
/dev/hda1 /mnt/hda1 vfat noauto,users,exec,umask=000 0 0
/dev/hdb2 swap swap sw,pri=1 0 0
/dev/hdb4 /mnt/hdb4 ext3 noauto,users,exec 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,users,dev,ro 0 0
/dev/cdrom1 /mnt/cdrom1 udf,iso9660 noauto,users,dev,ro 0 0
/dev/floppy /mnt/floppy vfat,ext2,hfsplus noauto,users,dev,sync,dirsync 0 0

Last edited by faithman2k; 06-16-2005 at 06:37 AM.
 
Old 06-14-2005, 06:54 AM   #2
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Rep: Reputation: 32
Add the umask=000 option to the line corresponding to hdb4 in your fstab file.

/dev/hdb4 /mnt/hdb4 ext3 noauto,users,umask=000 0 0




Also note :

With the auto option, the device will be mounted automatically (at bootup). auto is the default option. If you don't want the device to be mounted automatically, use the noauto option in /etc/fstab. With noauto, the device can be mounted only explicitly.

hope that helps.
 
Old 06-14-2005, 07:03 AM   #3
faithman2k
LQ Newbie
 
Registered: Jun 2005
Distribution: Mepis
Posts: 6

Original Poster
Rep: Reputation: 0
thank you

thanks

I'll give it a try now. and post back with some feedback.
 
Old 06-14-2005, 07:19 AM   #4
faithman2k
LQ Newbie
 
Registered: Jun 2005
Distribution: Mepis
Posts: 6

Original Poster
Rep: Reputation: 0
it didn't work. still can't write to the drive.

I don't know if it's anything like Windows but I restarted the system (but now I seem to remember someone saying you don't have to do that).

the response is that same.

sorry to be a nuisance.

Last edited by faithman2k; 06-14-2005 at 07:21 AM.
 
Old 06-14-2005, 03:52 PM   #5
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Rep: Reputation: 32
No problems at all. It's a pleasure to help.

Hmm... it should have worked.

My fstab looks like :

Code:
/dev/hda7        swap             swap        defaults         0   0
/dev/hda6        /                reiserfs    defaults         1   1

 /dev/hda1        /win1            vfat        umask=000        1   0 
 /dev/hda5        /win2            vfat        umask=000        1   0 

/dev/cdrom       /mnt/cdrom       iso9660     noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
and I can write to both hda1 and hda5 as a normal user. You could try making a similar entry in your fstab and see if it works.


Also you have to restart your system for these new settings to take effect.
Post back the output of fdisk -l command. Run this command as root.



Here's a very good tutorial on how to understand and edit the fstab file :
How to edit and understand /etc/fstab

Hope this helps.

Last edited by koodoo; 06-14-2005 at 03:56 PM.
 
Old 06-15-2005, 05:52 AM   #6
faithman2k
LQ Newbie
 
Registered: Jun 2005
Distribution: Mepis
Posts: 6

Original Poster
Rep: Reputation: 0
This is my fdisk -l result

Code:
Disk /dev/hda: 20.5 GB, 20525137920 bytes
255 heads, 63 sectors/track, 2495 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        2496    20044048+   c  W95 FAT32 (LBA)

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1         637     5116671   83  Linux
/dev/hdb2             638         702      522112+  82  Linux swap / Solaris
/dev/hdb3             703        3252    20482875   83  Linux
/dev/hdb4            3253        9729    52026502+  83  Linux
What I find interesting is that there is plus mark next to my swap partition and ALSO next to /dev/hdb4 is that significant?

Paul.
 
Old 06-16-2005, 06:41 AM   #7
faithman2k
LQ Newbie
 
Registered: Jun 2005
Distribution: Mepis
Posts: 6

Original Poster
Rep: Reputation: 0
anyone, anyone?? Bueller Bueller?



I've reading about the chmod command and tried using that, but that has not worked. I was wondering if it might be because there is a dynamic section to /etc/fstab... maybe I'm making it more complicated than it is though.

Hope someone can help soon.
 
Old 06-16-2005, 05:11 PM   #8
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Rep: Reputation: 32
Ya, your fstab file does have two sections (static and dynamic)

As far as I know the users option is just for allowing the user((s)) for mounting((unmounting)) the device/partition, otherwise the two sections are basically the same.
I mean the file does not actually have two sections it is just for the convenience for the users to identify devices they can mount/unmount

Also I noticed one thing that your original fstab file contains a noauto option for /dev/hda1 and /dev/hdb4. Shouldn't these be auto.
Do you explicitly mount these partitions after booting and then try writing to them?

Also in my first post I gave the following line :
/dev/hdb4 /mnt/hdb4 ext3 noauto,users,umask=000 0 0
Sorry I mentioned the noauto option by mistake.
Try this
/dev/hdb4 /mnt/hdb4 ext3 users,umask=000 1 0


Can you write to /dev/hda1 ? as a normal user.
Can normal users write in their home directories (/home/<normaluser>)?

Sorry, I don't think I will be able to help much. I am still a n00b myself.

Here's a piece of extra information that may be useful :
Code:
You need not reboot your system for the change to take effect, just make the Linux system aware about the modification you have made to the /etc/fstab file. This can be accomplished with the following commands:

           [root@deep] /#mount -oremount <partition>
Hope that helps...
keep me posted if ya find any solution
Goodluck.
 
Old 06-19-2005, 12:01 AM   #9
faithman2k
LQ Newbie
 
Registered: Jun 2005
Distribution: Mepis
Posts: 6

Original Poster
Rep: Reputation: 0
No success

It didn't work. i think it might be a Mepis thing.

I couldn't "remount" so after I saved /etc/fstab I restarted. I then go back to fstab and it's back to what it was.

I'm going to give up on it for the time being. Thanks for your help and I have to say that I've already learnt a lot!!

Paul.

PS. There is a superuser filemanager that I discovered installed on my system and I used that it did everything I needed to do. So I suppose it's a good compromise right now.
 
Old 06-19-2005, 03:21 PM   #10
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Rep: Reputation: 32
Good to hear that you've learnt a lot.

If ya find anything more on this issue keep us posted as there might be other people experiencing similar problems. Also checkout the Mepis forum of this site maybe you could find some answers there.

Goodluck and, all the best, for the future.

Last edited by koodoo; 06-19-2005 at 03:23 PM.
 
Old 06-19-2005, 09:38 PM   #11
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 14.2 Solus
Posts: 2,264

Rep: Reputation: 51
One suggestion: remove the noauto completely.

Try changing "users" to "user"
 
  


Reply


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
Slackware Install not actually writing to hard disk MichaelF Slackware - Installation 5 11-03-2005 03:58 AM
mounting a hard disk image as user? zero79 Debian 2 05-05-2005 07:12 PM
Problem Writing to A Hard Drive Farquar210 Red Hat 5 06-23-2004 01:35 PM
problems writing to newly installed second hard disk ffenics2002 Linux - Hardware 7 02-12-2004 01:16 PM
writing to hard disk from kernel mode.. udayan Programming 0 07-09-2002 05:34 AM


All times are GMT -5. The time now is 06:26 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration