Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
help with clarifying directory permissions for ext3 mounted partitions
for Ubuntu I have a root partition and a /home partition -- and for Xubuntu I have a root partition and a /home partition
- all the filesystems are ext3
I went by this tutorial to mount my Ubuntu /home partition in Xubuntu. I set the mount point as /mnt/ubuntu_home
at the bottom of that guide it says to set the permissions like:
sudo chown -R erfahren:erfahren /mnt/ubuntu_home sudo chmod -R 755 /mnt/ubuntu_home
I have read that the permission to execute needs to be set on the directory itself in order to "access it", does that mean being able to read and write to it and its contents? - The reason I ask that is because a couple of guides gave an example of being able to list its contents and didn't mention reading and writing to it.
So would the proper way to set them be just "sudo chomd 755 /mnt/ubuntu_home" ? Would that allow me to read, write, delete, etc. the subdirectories and contents?
I've searched and came up with many guides related to mounting Windows partitions (and the like) and many on file permissions but none seemed to go into too much depth about mounting other Linux partitions and setting permissions.
oh, an example of the line in my (Xubuntu's) /etc/fstab - (could it be made differently to do what I want?)
# ubuntu home /dev/sda6 /mnt/ubuntu_home ext3 defaults 0 0
01-15-2008 #2So would the proper way to set them be just "sudo chown 755 /mnt/ubuntu_home" ? Would that allow me to read, write, delete, etc. the subdirectories and contents?
sudo chown erfahren:erfahren /mnt/ubuntu_home
Everything in the Linux filesystem has the same three permissions: read, write, execute. These are a bit strange for directories, but they make sense:
read: allows you to view the contents of a directory (with a utility such as ls)
write: allows you to create and remove entries in the directory. Note that if you have write permissions on a directory, you can remove files created by other users in that directory.
execute: allows you to enter a directory
So for instance, my home directory at school has permissions rwx--x--x. This means that only I can view its contents or create things inside that directory. Other people can enter the directory, but cannot see anything there. The reason for my doing this is that my ~/.www directory needs to be accessible to have a website, but I don't want people to be able to see anything else of mine.
- Join Date
- Feb 2005
thanks devils_casper - (and thanks for catching my typo - I meant to put "chmod" there).
It usually takes me going back and fixing stuff for me to learn - a bad habit, but a fairly effective one.
I read more on the /etc/fstab at tuxfiles and have a much better understanding on that as well. Using the defaults mount options already includes read/write
between that and setting the ownership gives me what I need. (I realized that since I use the same username on both distros that may not even be necessary.)
I understand the purpose of only setting the execute permission on a directory now too, Cabhan - (I couldn't figure out the point of letting a user enter a directory and not being able to see the contents). After going back and re-reading the tuxfile page on permissions I saw that it says a user would not be able to list the contents. The execute permission would need to be set on a main directory in order for a user to have access to one of its subdirectories.
I think I have a good handle on this now.
thanks again folks!
And ehrfahren, another reason for such a thing is that you might have files named by default (~/.bashrc, for instance), that people can still access, supposing that they already know the name. It's admittedly not a common situation, but it does exist.
Also, note that username is meaningless. This stuff is all actually handled via UIDs (user IDs), which may be different across different systems. So it may will still be necessary to explicitly set ownership.