Титла: mount & permissions za ext3
Публикувано от: vic_semionov в Oct 20, 2004, 13:27
здравейте
имам следния проблем със монтиране на ext3 дял (slackware-current, kernel 2.6.7): за този дял имам ред във fstab. след като се монтира в директория /mnt/stor, тя вече принадлежи на група users и има флаг g+w, т.е. всеки обикновен потребител може да записва там. странното е че главната ми файлова система (/) пак е ext3 но е с group=root. от какво се определя тази разлика? има ли начин с някоя опция на mount или tune2fs да променя owner & permissions на този дял? става с "chmod g-w /mnt/stor", но ми се иска да стане по-елегантно, при автоматичното монтиране, а не отделно след него. за създаване на файловата система използвах "mke2fs -j /dev/hda2".
мерси
Титла: mount & permissions za ext3
Публикувано от: sys7em в Oct 20, 2004, 13:40
Промяната на собственика става с командата chown Примерен код | chown
change the ownership of files and/or directories Command SYNOPSIS
chown [-fR] owner[:group] pathname ... DESCRIPTION
chown sets the user ID to owner for the files and directories named by pathname arguments. owner can be a user name from the user database, or a numeric user ID.
If you include a group name (specify the owner followed immediately by a colon (:) and group with no intervening spaces, such as owner:group), chown also sets the group ID to group for the files and directories named.
On Windows NT/2000/XP/2003, you need appropriate permissions to use chown to change the ownership of a file:
* If you have "take ownership" permission (shown as WO or writeowner by lsacl), you can make yourself the owner. * If you have "take ownership" permission and you are an administrator, you can make administrator the owner. * If you have the SE_TAKE_OWNERSHIP_NAME privilege, you can bypass the fact that you do not have "take ownership permission", and make yourself or administrator the owner. * If you have "restore" privilege, you can set the owner to anybody.
Also, on Windows NT/2000/XP/2003, you can specify owner in the form domain\user, although this may not work if you specify a domain other than your local machine domain. Options
-f
does not issue an error message if chown cannot change the owner. In this case, chown always returns a status of zero. Other errors may cause a non-zero return status. -R
If a pathname on the command line is the name of a directory, chown changes all the files and subdirectories under that directory to belong to the specified owner (and group, if :group is specified). If chown cannot change some file or subdirectory under the directory, it continues to try to change the other files and subdirectories under the directory, but exits with a non-zero status.
|
Титла: mount & permissions za ext3
Публикувано от: vic_semionov в Oct 20, 2004, 13:52
10x sys7em, но аз търся друг начин, а не с chown - т.е. с някоя опция на mount (но не виждам такава в man page), или с някоя опция при създаването на самата файлова система.
а и от какво се определя разликата, че като монтирам "/" е на група root, а като монтирам същия тип FS, пак от fstab, и със същите опции, нейния mount-point вече е на група users?!
Титла: mount & permissions za ext3
Публикувано от: vic_semionov в Oct 20, 2004, 13:59
аа да бе да се таковам!  оправих се. значи трябвало е да вляза в /mnt/stor и от там да chown-на ".", а не от директорията /mnt... оказа се прав, sys7em мерси
Титла: mount & permissions za ext3
Публикувано от: sys7em в Oct 20, 2004, 14:08
np 
|