Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am able to mount it at boot time by apending the fstab with this line:
/dev/md1 /data/sysadmin ext3 defaults 0 0
But i need to do one more thing, i need to Set GUID on the mount point, ie 'sysadmin' directory so that all files created henceforth will heave group as 'sysadmin' irrespective of the one who creates it.
Can anyone help?
ps: i know that i can pass more options along with 'defaults' in the fstab file, but i am unaware of the exact syntax. please give me the exact syntax.
This will produce a nice looking postscript file that you can print out.
Another option is 'man -Tdvi mount >mount.dvi
You can view and print out the file in 'kdvi' or 'xdvi' programs.
Other man or info pages to look at are 'fstab' 'fileutils' and 'coreutils'.
If the directory needs to have write access for users who are not members of the group you mentioned, then you need to use the 'chmod o+w' command on the directory to give them write access. However this would give everyone write access to the directory, so you may need to come up with a different group name, and make all users with write access members of the group, or make these users members of 'sysadmin'.
Another alternative is to use SELinux, which allows fine tuning of file access using ACLs (Access Control Lists). This might require a re-install and would entail study and planning. Red Hat may have an SELinux kernel package you can install, but there would be more to it, and someone else would have to give you the details.
You would use either the umask or the fmask and dmask options when mounting a fat32 or ntfs or smb partition. It is done this way because these are foreign file systems which don't contain the normal unix file information. You can even use a uid and gid mounting option in fstab to determine the owner and group of the partition. When used in the /etc/fstab file, these options determine what the permissions on files and directories will be.
However for a unix file-system, the umask is a function of the shell and not a particular partition. It is the default file creation mask, and is used to filter out (eliminate) file permissions when a file is being created. However, the partition might contain older files and directories with different permissions.
In contrast, the umask and fmask options in the /etc/fstab file determine what the permissions of all of the files will be.
On an ext3 partition or directory, you use the chmod command to change permissions on a mounted partition. After doing it once, it will retain those permissions the next time it is mounted. In other words this information is contained in the file-system being mounted except for certain file-systems that don't contain unix/linux file-system information (Such as Fat32, NTFS and Samba). That is when you include them in the mount command. However these permissions will apply to the entire partition.
One last note. The fmask and dmask options I mentioned earlier are similar to the umask option, but the fmask effects files while the dmask effects directories. This allows you to mask out the execution bit for files on a world writeable directory. The 'x' bit is different for directories. It allows one to enter the directory.
grpid or bsdgroups / nogrpid or sysvgroups
These options define what group id a newly created file gets. When grpid is set, it takes the group id of the directory in which it is created; otherwise (the default) it takes the fsgid of the current process, unless the directory has the setgid bit set, in which case it takes the gid from the parent directory, and also gets the setgid bit set if it is a directory itself
This is the section for 'ext2' filesystems. The 'ext2' options are a subset of the 'ext3' options.
This answers your question, but I found the answer by doing precisely what I suggested you do! But double check the man page on your system to make sure. Also, I've noticed that the '-T' option isn't available on Mandrake for AMD64, so always double check things you get off the web on your own system to make sure that they hold.