actuality.log


Thursday, March the 17th, 2005

partially. But there have been semi-major data losses (including said posts) with the whole computer not being OK thing. And that sucks.

So, while I was salvaging stuff and waiting for many many gigs of data to get copied over to the new external hard drive, I wrote this up.

Why would you care? You don’t. I was just trying out some new CSS to get a “console” like feel for the command line stuff. And it looks sweet.

This is a printer-friendly version of the journal entry “I’d written up two other posts” from actuality.log. Visit http://emphaticallystatic.org/earlier/id-written-up-two-other-posts/ to read the original entry and follow any responses to it.

4 Responses to “I’d written up two other posts”

  1. pul| says:

    Nice tutorial. However, the instructions for the fstab entry in Step 11 (i.e.)

    /dev/sda1 /mnt/external ext3 rw,noauto,user 1 0

    would let me mount the drive as a normal user, but not let me write to it (except as root) for some odd reason. I got away with this instead:

    /dev/sda1 /mnt/external ext3 user,defaults 0 0

    Would you happen to know why?

  2. wahgnube says:

    So that there is no confusion, the real answer to your question is yes, I happen to know why and have elucidated how to get it working at the end of this reply. But before that, here is the deal with fstab.

    Its format is:
    devicename mountpoint filesystemtype mountoptions backupoptions checkoptions

    Which I’d set as:
    /dev/sda1 /mnt/external ext3 rw,noauto,user 1 0

    Since the first three columns are obvious (and the last two aren’t immediately pertinent), I’ll talk about the fourth column. My mountoptions include rw, noauto and user.

    rw – mount filesystem in read/write mode
    noauto – don’t attempt to mount at boot (because I might have not plugged the drive in)
    user – allows a normal user to mount the drive

    This is exactly what I wanted. The option “defaults” on other hand implies
    rw, suid, dev, exec, auto, nouser, and async
    unless overriden by other options (like your defaults,user). You can read up on all these and a lot more by typing ‘man mount’.

    To answer your question, though I had set it up so that anyone could mount it, the folder /mnt/external was still created by (and thus owned by root).

    [me@localhost me]$ ls -l /mnt/
    total 16
    drwxr-xr-x 2 root root 4096 Sep 3 2004 camera
    drwxr-xr-x 2 root root 4096 May 20 2004 cdrom
    drwxr-xr-x 4 root root 4096 Mar 20 15:10 external
    drwxr-xr-x 2 root root 4096 May 20 2004 floppy

    (Recalling of course, that just because anyone could access a mounted /, doesn’t mean they can arbitrarily write anywhere on it before an appropriate permissions heirarchy is in place, /home/user being user’s castle, for instance.)

    I didn’t mention this, but I later went on to create a folder in /mnt/external, say /mnt/external/mystuff and chowned it to me. Therefore I, as a regular user ‘me’ can write into /mnt/external/mystuff but not directly into /mnt/external (which is what you’re trying). This was the behaviour I was aiming for.

    If this isn’t what you want, you can chown /mnt/external to a specific user or groups of users. So apart from anyone being able to mount/unmount it, they can also write all over it. (Not what I want.) If in doubt, man chown is your friend.

  3. pul| says:

    Thanks for the explanation!


1 people conned into wasting their bandwidth.