[Solved] Set partitions to hide or read only

New to Debian (Or Linux in general)? Ask your questions here!

Re: Set partitions to hide or read only

Postby Alex_80 » 2010-03-09 13:27

Also out of media or mnt folder, in every subfolder of root folder?
Alex_80
 
Posts: 43
Joined: 2010-02-21 21:04
Location: Italy

Re: Set partitions to hide or read only

Postby nadir » 2010-03-09 18:29

yes.
as far i know (as i usually do it like described i ain't got much experience doing it different, but i did)
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.
User avatar
nadir
 
Posts: 5964
Joined: 2009-10-05 22:06
Location: away

Re: Set partitions to hide or read only

Postby Alex_80 » 2010-03-09 20:50

Thanks.

What are the differences between to set authorizations (read only, read write, ...) from fstab file, /mnt/sdb5 folder and partition (labeled in my case "10 GB Volume") in Computer?
Alex_80
 
Posts: 43
Joined: 2010-02-21 21:04
Location: Italy

Re: Set partitions to hide or read only

Postby Alex_80 » 2010-03-12 16:26

What is priority between authorization of "10 GB Volume", sdb5, fstab?
Alex_80
 
Posts: 43
Joined: 2010-02-21 21:04
Location: Italy

Re: Set partitions to hide or read only

Postby jjmac » 2010-03-22 23:44

Howdy,


Alex_80 wrote:
>>
What are the differences between to set authorizations (read only, read write, ...) from fstab file, /mnt/sdb5 folder and partition (labeled in my case "10 GB Volume") in Computer?
>>


When you set the permissions directly to a mounted filesystem, as that is effectively what a mounted partition is ... your setting them in that filesystem.

This will over-ride whatever the permissions are for that mount point (ie; directory) in its' filesystem. The directory point will revert when the partition is unmounted.

When set in /etc/fstab, by that i think you mean passing options such as 'users' etc ... your just fine tuning the above. Even by setting allowable access to 'users', it will need that also to be the case in the mounted filesystem. But you could 'deny' that access via /etc/fstab though, even if allowed in the mounted filesystem. Effectively over-rideing that filesystem. But then, by mounting the filesystem somewhere else, you could over-ride its' other mount points accessibility.

That is not as complex as it might sound either :). But do, do some simple experiments with that just, to verify. It's been a while since i last had to do anything along those lines. And you wont do any harm in the process.

]# chmod 755 /mnt/some_dir
]# chown <name> /mnt/some_dir
]# chgrp <name> /mnt/some_dir

Using the above programs on a mounted partition will effect the changes needed to verify what i stated above. And are easily reversible.

Note:
-------
group member ships are not duplex in nature. That is, being the member of a group ... such as 'www_data' doesn't mean that 'www_date' is also a member of your user group.


jm
http://counter.li.org
#313537

-=- The FVWM wm -=- http://www.fvwm.org -=-

Somebody stole my air guitar, It happened just the other day,
But it's ok, 'cause i've got a spare ...
jjmac
 
Posts: 387
Joined: 2005-12-28 23:34
Location: Australia

Re: [Solved] Set partitions to hide or read only

Postby Alex_80 » 2010-04-08 12:17

Thanks. :)

About to hide partition I have solved don't inserting (or commenting) it in /etc/fstab file.

About to set partition sdb5 to read only I have solved inserting in /etc/fstab:
/dev/sdb5 /mnt/sdb5 ext3 defaults, ro 0 0
Alex_80
 
Posts: 43
Joined: 2010-02-21 21:04
Location: Italy

Re: [Solved] Set partitions to hide or read only

Postby jjmac » 2010-04-09 10:22

Howdy,


Not having an entry, or commenting in an entry in /etc/fstab will prevent mount from auto mounting the partition at boot time ... true ...

But ...

The /etc/fstab file is only there so that 'mount' can source it when ever it is invoked. It just saves having to provide options everytime it is used. It is easily over-rided by a script.

>>
/dev/sdb5 /mnt/sdb5 ext3 defaults, ro 0 0
>>


So, mount will mount sdb5 read-only. And it will prevent a non-root user from mounting the partition (fs) as well. But it will be 'auto' mounted at boot, and so be available for viewing by any one with access.

Adding the 'noauto' option to the option list will squash that though.

Code: Select all
/dev/sdb5 /mnt/sdb5 ext3 defaults,noauto ro 0 0


The last '0' will stop fsck from ever checking it too. If that's what you realy want.


jm
http://counter.li.org
#313537

-=- The FVWM wm -=- http://www.fvwm.org -=-

Somebody stole my air guitar, It happened just the other day,
But it's ok, 'cause i've got a spare ...
jjmac
 
Posts: 387
Joined: 2005-12-28 23:34
Location: Australia

Re: [Solved] Set partitions to hide or read only

Postby Alex_80 » 2010-04-09 17:48

1) About read-only partition it's OK, I wish that partition is auto mounted as read-only at boot for all users and root.

2) About hide partition it's enough to prevent that users and root can mistake mounting that partition by double click in Computer, so my solution it's OK for me, but if there is a solution to make impossible mount this is better.
Alex_80
 
Posts: 43
Joined: 2010-02-21 21:04
Location: Italy

Previous

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable