Latest Diablo 3 News
DiabloWiki Updates
Support the site! Become a Diablo: IncGamers PAL - Remove ads and more!

Linux permissions

Discussion in 'Off-Topic' started by {KOW}Spazed, Apr 5, 2004.

  1. {KOW}Spazed

    {KOW}Spazed Banned

    Joined:
    Jul 20, 2003
    Messages:
    11,578
    Likes Received:
    0
    Trophy Points:
    0
    Linux permissions

    So I got Linux up and running all by myself yesterday(Yay for me!) without using any guides or anything. I did however seem to not be able to figure out how to allow a normal user(read:not root) to access the CD drives/Floppy. The root user can use them and they work just great, my everyday accout however cannot. If I open the CD player it says "Drive Error". Since I can use the drive in the same program on teh root I am betting this is a permissions issue. Anybody care to clue a clueless nub in on the secret to this little problem.
     
  2. Painman

    Painman IncGamers Member

    Joined:
    Jun 22, 2003
    Messages:
    2,030
    Likes Received:
    1
    Trophy Points:
    166
    I think the chmod command is what you're after, but it's been a while
     
  3. Corneo

    Corneo IncGamers Member

    Joined:
    Jun 22, 2003
    Messages:
    1,531
    Likes Received:
    0
    Trophy Points:
    346
    ...I am have been trying to get linux on my computer for months....I can failing...
     
  4. {KOW}Spazed

    {KOW}Spazed Banned

    Joined:
    Jul 20, 2003
    Messages:
    11,578
    Likes Received:
    0
    Trophy Points:
    0
    Maybe you should try it sober. . .


    I need a little more instrutruction than chmod. . .as in what do I do after I put that in?
     
  5. Corneo

    Corneo IncGamers Member

    Joined:
    Jun 22, 2003
    Messages:
    1,531
    Likes Received:
    0
    Trophy Points:
    346
    chmod is for changing permission for files and directories though isn't it?
     
  6. {KOW}Spazed

    {KOW}Spazed Banned

    Joined:
    Jul 20, 2003
    Messages:
    11,578
    Likes Received:
    0
    Trophy Points:
    0
    How do I access my cdrom drive?

    Linux requires you to mount your cdrom/floppy drives when you wish to use them. On most Linux distributions, the mount command will require root access. Depending on which Linux distribution you run, one of the following commands should mount your cdrom drive. As root, run:
    mount /dev/cdrom /mnt/cdrom
    mount /dev/cdrom /cdrom



    How do I access my floppy drive?

    Linux requires you to mount your cdrom/floppy drives when you wish to use them. On most Linux distributions, the mount command will require root access. Depending on which Linux distribution you run, one of the following commands should mount your floppy drive. As root, run:
    mount /dev/fd0 /mnt/floppy
    mount /dev/fd0 /floppy


    Do these mean I have to log in as root to use my CD/Floppy drives? This seems kind of weird, because I know I have seen people use them without being logged in as root. Plus it just wouldn't make sense to do it.

    So uhhh MM could you shed some light on this? I bow to your mighty Linux Guru :worship: knowledge. . .and the strange ability to hold a mega list of sites in your head. ;)
     
  7. ash2ash

    ash2ash IncGamers Member

    Joined:
    Jun 29, 2003
    Messages:
    436
    Likes Received:
    0
    Trophy Points:
    98
    Yes you need to be logged in as root to access the cdrom drive - sorry - it's a linux thing :p

    First of all, you have to make sure that the TARGET of the mount exists.
    i.e. to do a "mount /dev/fd0 /mnt/floppy" make sure that /mnt/floppy exists (as a directory, not a file).

    To do a cdmount, the command is as you said,
    "mount /dev/cdrom /mnt/cdrom"

    In some distributions (like gentoo), the 1st cdrom device is "/dev/cdroms/cdrom0" so the command would be:
    "mount /dev/cdroms/cdrom0 /mnt/cdrom"

    Then you should be able to browse your cdrom by browsing to the /mnt/cdrom directory.

    Finally, yes it is possible to get an automount scheme going. However, as I understand it, you usually have to install additional software to enable this. There are also kernel options available for this, but it is still in an experimental phase and very buggy to the point where a patch is required.

    If you are dead set on getting your drive to mount by default, take a look at mandrake linux - from what I understand, mandrake has the automount software installed by default.

    Edit: sorry, it might help if I actually read the first post.

    If you can get things done as root but not as other users, try doing this:

    "chmod +rx /mnt/cdrom"

    This will enable (r)ead and e(x)ecute permissions on the cdrom for all users. (but you'll still have to mount / unmount as root)
     
  8. Mad Merlin

    Mad Merlin IncGamers Member

    Joined:
    Jun 21, 2003
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    105
    There are two reasonable options that I'm aware of here...

    1. Use Supermount or Automount and not worry about mounting removeable media. In the long run, this will probably be much handier, as you won't have to manually mount things. In the short run it may involve using a new distribution, recompiling your kernel or fiddling with some config files.

    2. Make mount set uid. Just run (as root, from wherever the mount binary is located)

    chmod u+s mount

    and you'll be able to mount as a normal user. You may also want to do the same for umount (not unmount), for obvious reasons. What set uid does is give whoever runs the binary (in this case, you as a normal user) the same permissions as the owner of the binary (root, unless you have a very strange system setup), but only for that process.
     

Share This Page