[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian Squeeze mounting problem



David Christensen wrote:
On 10/31/2015 08:28 AM, Richard Owlett wrote:
I'm having problems understanding
http://manpages.debian.org/cgi-bin/man.cgi?query=mount&apropos=0&sektion=0&manpath=Debian+6.0.10+squeeze&format=html&locale=en


I have 3 partitions labeled proj-all, proj-1, and proj-2.
The machine intentionally has no networking.
There are 2 relevant but minimally privileged users [u1 and u2].
I wish to have proj-all mounted at power on with
read/write/execute
privileges for both u1 and u2.

proj-1 and/or proj-2 will be mounted separately if required.
Once mounted, u1 and u2 will each have read/write access.

How do I accomplish this.

I don't use labels much in Linux, but they can be helpful when I
have multiple disk drives of the same make and model with
identical partitioning schemes.


I use UUID's to identify partitions in /etc/fstab.  For example:

     # /boot was on /dev/sda1 during installation
     UUID=2ef32b38-2ede-491d-9d4d-e9da3282170f /boot
ext4        defaults,discard                    0       2


"mount" connects a disk partition containing a file system into
the Linux file system heirarchical tree.


Traditional read, write, and execute permissions are controlled
by the "mode" bits:

     https://en.wikipedia.org/wiki/Modes_%28Unix%29


So:

1.  If you want all users to have full access to the file system
on the partition labeled "proj-all", then you need to create an
empty directory (mount point), mount the partition file system
into that directory, and set the "other" read, write, and execute
mode bits of the directory once mounted.

2.  If you want just u1 and u2 to have full access to "proj-all",
then you need to create an empty directory, mount the partition,
create a group containing u1 and u2, change the group ownership
of the directory to the group you created, set the "group" read,
write, and execute bits, and clear the "other" bits.

3.  If you want just u1 to have full access to "proj-1", then you
need to create an empty directory, mount the partition, and
either create a group with just u1 and do the above, or change
the user ownership of the directory to u1, set the "user" read,
write, and execute bits, and clear the "group" and "other" bits.




Thank you.
The "shape" of your answer indicates my question could be better phrased. The Wikipedia reference (or one of its links) indicates the answer will not be of the originally desired "shape". I think I've been given enough hints to create a workable if not ideal solution.



Reply to: