Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

can't access floppy except as root, how to give user access?

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
15 posts • Page 1 of 1
Author
Message
Trisha
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Wed Mar 31, 2004 11:51 pm

can't access floppy except as root, how to give user access?

  • Quote

Post by Trisha » Mon Apr 26, 2004 6:49 am

I'm only able to access files on my external floppy if I'm logged in as root. I'm guessing that it is because I have not given myself the proper permissions to do that. What is the command to add that to me as a user? (Sorry if this doesn't sound very coherant - its around 2 am here). What I mean is I know I would use usermod, but what would be needed for floppy access? Just 'floppy'? Or does it have some sort of name?

To learn more about this too, where would I look in the manual to learn more about groups, like wheel and stuff also?
Top
lamekain
Guru
Guru
User avatar
Posts: 331
Joined: Tue Nov 25, 2003 7:58 am
Location: Helsinki, Finland
Contact:
Contact lamekain
Website

  • Quote

Post by lamekain » Mon Apr 26, 2004 7:05 am

see the file etc/fstab and read man fstab. By adding an option "user" you can make a mount point user-mountable.

That should fix the permissions, but if it doesn't you can add a umask to the options as well.

And the command to change permissions on the fly is chmod (man chmod..)
And the command to change ownership on the fly is chown
"Only when the last tree has died, the last river been poisoned,
and the last fish been caught, will we realize we cannot eat money"

-Global Terrorism.org
Top
Trisha
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Wed Mar 31, 2004 11:51 pm

  • Quote

Post by Trisha » Mon Apr 26, 2004 5:44 pm

I read the file etc/fstab and man fstab but didn't really understand them.

While in root, to mount the floppy I do:

mount -t msdos /dev/sda /mnt/floppy

Then I am able to open the file on the floppy by navigating to mnt/floppy. When I do it as a regular user I cannot open the file.

I wasn't sure how to do 'adding an option "user" ', but I tried:

mount -t msdos /dev/sda /mnt/floppy user trisha

and that didn't work, so I guess I don't really know how to do that.

I thought I would have to modify the user with usermod.

I've used chmod to change permissions through wsFTP for files on a server, but that's all. I know how to do a few things, but don't really understand the bigger picture of what I'm doing. I need a good linux book to explain things to me more simply. I tried looking for a gentoo one, but haven't found one yet.
Top
SysOP XXL
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 139
Joined: Tue Jan 27, 2004 1:53 pm
Location: Kecskemét, Hungary

  • Quote

Post by SysOP XXL » Mon Apr 26, 2004 5:49 pm

You don't need to specify your username there.

Here's my floppy in fstab:

Code: Select all

/dev/fd0      /mnt/floppy     auto           noauto,user,rw          0 0
Top
Trisha
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Wed Mar 31, 2004 11:51 pm

  • Quote

Post by Trisha » Mon Apr 26, 2004 6:06 pm

what do the "auto noauto,user,rw 0 0" parts do/mean?

and that is all on one line?
Top
lamekain
Guru
Guru
User avatar
Posts: 331
Joined: Tue Nov 25, 2003 7:58 am
Location: Helsinki, Finland
Contact:
Contact lamekain
Website

  • Quote

Post by lamekain » Mon Apr 26, 2004 7:01 pm

A good source for linux knowledge: the manual pages. They cover most of the important parts. To see a manual page type

Code: Select all

man *command*
Where *command* is the manual page you wish to see. Manual pages also exist for specific files and other important things. So to see info about fstab-file just type:

Code: Select all

man fstab
That'll explain the options. :wink:
(noauto=don't mount automatically,user=let user mount,auto=mount automatically... and rw=read-write. the 0 0 don't mean much, but check with the manual page)
"Only when the last tree has died, the last river been poisoned,
and the last fish been caught, will we realize we cannot eat money"

-Global Terrorism.org
Top
Trisha
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Wed Mar 31, 2004 11:51 pm

  • Quote

Post by Trisha » Mon Apr 26, 2004 7:27 pm

I tried:

mount -t msdos /dev/sda /mnt/floppy user

while logged in as root and then logged in as a user but still couldn't get it to work.

I read the manual pages for fstab and mount more than once now, but still don't understand a word of it, like about every 3rd word I have no idea what it means.

Oh well, I hope that I eventually hear back from the support people I got the computer from. I was really hoping to be able to use the floppy soon.
Top
SysOP XXL
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 139
Joined: Tue Jan 27, 2004 1:53 pm
Location: Kecskemét, Hungary

  • Quote

Post by SysOP XXL » Mon Apr 26, 2004 8:36 pm

Trisha wrote:what do the "auto noauto,user,rw 0 0" parts do/mean?

and that is all on one line?
The first auto means to automatically decide the filesystem (typically FAT) on the floppy.

The second group (noauto,user,rw):
  • noauto, so it won't mount the floppy disk automatically on boot time
    user, so every user can mount it
    rw, so the users can both read and write the contents of the disk.
I'm not sure about the two zeros though :D but they must be there :)

And yes, this all is one line.

EDIT: Also I mount the floppy with

Code: Select all

mount /mnt/floppy
, no fancy options :)

EDIT2:

If sda is your floppy, then this is the line for you:

Code: Select all

/dev/sda      /mnt/floppy     auto           noauto,user,rw          0 0
Then the command

Code: Select all

mount /mnt/floppy
should work.
Top
Trisha
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Wed Mar 31, 2004 11:51 pm

  • Quote

Post by Trisha » Mon Apr 26, 2004 8:55 pm

That may have worked, but I can't really tell. Now as a user I get a different error.

I thought that moving text files, like .txt made from notepad and .html files back and forth with floppys from a pc to my gentoo laptop would be easy, but I guess it's not.

Not sure where to go from here. Maybe I am in over my head with this, but there is no going back now. I spent too much money on this computer, I have to find a way to be able to use it.
Top
SysOP XXL
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 139
Joined: Tue Jan 27, 2004 1:53 pm
Location: Kecskemét, Hungary

  • Quote

Post by SysOP XXL » Tue Apr 27, 2004 4:31 am

Trisha wrote:That may have worked, but I can't really tell. Now as a user I get a different error.
Could you paste that error message here?
I thought that moving text files, like .txt made from notepad and .html files back and forth with floppys from a pc to my gentoo laptop would be easy, but I guess it's not.
Basically it is, the only difference is that you have to sync or umount the disk to have the data actually written on the disk.
Not sure where to go from here. Maybe I am in over my head with this, but there is no going back now. I spent too much money on this computer, I have to find a way to be able to use it.
Paste the message here :D And maybe your fstab.
Top
Trisha
Tux's lil' helper
Tux's lil' helper
Posts: 97
Joined: Wed Mar 31, 2004 11:51 pm

  • Quote

Post by Trisha » Wed Apr 28, 2004 1:24 am

Thanks SysOP XXL

the support person from the place I got the computer from said to do this;

mount -0 uid=myusername /dev/sda /mnt/floppy

it seems to be working. But I am out of town now and have not had much time to really play with it to be certain that all is ok, but it looks positive!

As far as unmounting goes, I haven't gotten that far yet!!
Top
lamekain
Guru
Guru
User avatar
Posts: 331
Joined: Tue Nov 25, 2003 7:58 am
Location: Helsinki, Finland
Contact:
Contact lamekain
Website

  • Quote

Post by lamekain » Wed Apr 28, 2004 2:17 pm

unmounting works by typing umount "device location or directory"

In your case:

Code: Select all

umount /dev/sda
...or..
umount /mnt/floppy
ALWAYS remember to umount the disk if the contents have changed! They won't get written until you umount (makes using the disk a lot faster, because the files are written on a virtual disk in the harddrive, but you have to remember the umount.. ).
"Only when the last tree has died, the last river been poisoned,
and the last fish been caught, will we realize we cannot eat money"

-Global Terrorism.org
Top
Gandalf the White
Guru
Guru
Posts: 320
Joined: Wed Dec 17, 2003 2:40 pm
Location: Verdun, Canada
Contact:
Contact Gandalf the White
Website

  • Quote

Post by Gandalf the White » Wed Apr 28, 2004 2:23 pm

Have you had any luck? Not sure if this would help or not, but by adding the option umask=000 to the floppy section of the fstab may help. OT, those of you wondering about the 0 0 at the end of every entry, if I remember correctly, it is whether or not to run fsck on boot. If I remember correctly, 0 means false, 1 means true, and the first number is whether or not to run fsck on normal boot, and the second number is whether or not to run fsck after the filesystem has been uncleanly umounted. I'm not 100% on this, but i'm pretty sure that's what it is.
Top
SysOP XXL
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 139
Joined: Tue Jan 27, 2004 1:53 pm
Location: Kecskemét, Hungary

  • Quote

Post by SysOP XXL » Wed Apr 28, 2004 2:32 pm

AFAIK and As Far As I've Experienced (:)) the rw parameter is enough, you don't need to set the umask for the floppy.
Top
rewt
n00b
n00b
User avatar
Posts: 58
Joined: Thu Feb 19, 2004 9:38 am

  • Quote

Post by rewt » Wed Apr 28, 2004 2:32 pm

Gandalf is absolutely right. The numbers are to do with fscking the drive
0 means don't do it, other numbers specify the order in which the fsck should occur

As for unmounting. Data is held in buffers by the kernel and is only written to disk when they are flushed (either because the memory is needed by the kernel for other operations or because the disk has been synced). The data is not written to anything before this point so if you don't unmount then there is a possibility of data loss (infact a daemon runs to flush the buffers roughly every 30 seconds so you'll probably be ok ;) )
Because sometimes peace is another word for surrender... and secrets have a way of getting out
Top
Post Reply

15 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic