Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: A CGI script to list the files on my external harddrive

by davidj (Priest)
on Nov 14, 2006 at 13:05 UTC ( #583956=note: print w/ replies, xml ) Need Help??


in reply to Re^3: A CGI script to list the files on my external harddrive
in thread A CGI script to list the files on my external harddrive

You are correct. It IS because the drive is external. In Linux, (at least all the flavors I know), drives connected through a usb port are owned by root and cannot be changed. This is an Linux kernel OS issue.
Sorry, but what you want the script to do cannot be done.

davidj


Comment on Re^4: A CGI script to list the files on my external harddrive
Re^5: A CGI script to list the files on my external harddrive
by tirwhan (Abbot) on Nov 14, 2006 at 16:48 UTC
    In Linux, (at least all the flavors I know), drives connected through a usb port are owned by root and cannot be changed

    This is incorrect. Take a look at the user option in the mount man page. You can make a drive user-mountable by putting something like the following into /etc/fstab:

    /dev/sdc1 /mnt/external ext3 user,noauto 0 0

    This will allow any user to mount the partition /dev/sdc1 under /mnt/external. The user who mounts the device will also own the mountpoint (i.e. directory).

    Not that this has anything to do with Perl, but it seemed pertinent information :-)


    All dogma is stupid.
      Actually, what you said about /etc/fstab is correct; however, the problem runs a little deeper. In order for the entry in fstab to work, the user's bios has to allow booting from an external USB drive. To check that, you have to go into the bios and look at the "boot order". If the bios allows booting from the USB, then you'll see something like "usb-hdd". If it's there, then it's probably safe to make the entry in fstab. On the other hand, if you don't see "usb-hdd", then making the entry in fstab will cause the system to be unbootable---that's been my experience. Unfortunately, most bioses won't allow booting from an external USB.

        Sorry, but this post is complete nonsense. The fstab entry has nothing to do with the BIOS setting or capability at all (apart from anything else, if you'll reread my post you'll see that it even specifies "noauto", which means that the mount won't happen automatically, much less anywhere near boot time). Booting from an external disk is a completely unrelated issue. Please don't confuse people by making nonsensical statements when you clearly don't know what you're talking about. Sorry to be so harsh, but this is one of the most clue-devoid posts I've ever come across on perlmonks.


        All dogma is stupid.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://583956]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-08-23 02:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (171 votes), past polls