Автор Тема: mount & permissions za ext3  (Прочетена 2402 пъти)

vic_semionov

  • Напреднали
  • *****
  • Публикации: 144
    • Профил
    • WWW
mount & permissions za ext3
« -: 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".

мерси
Активен

sys7em

  • Напреднали
  • *****
  • Публикации: 401
    • Профил
    • WWW
mount & permissions za ext3
« Отговор #1 -: 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.
Активен

Европейци сме ний, ама все не сме дотам!. . . Прощавай, не е за чудо пак да се срещнем.

vic_semionov

  • Напреднали
  • *****
  • Публикации: 144
    • Профил
    • WWW
mount & permissions za ext3
« Отговор #2 -: Oct 20, 2004, 13:52 »
10x sys7em, но аз търся друг начин, а не с chown - т.е. с някоя опция на mount (но не виждам такава в man page), или с някоя опция при създаването на самата файлова система.

а и от какво се определя разликата, че като монтирам "/" е на група root, а като монтирам същия тип FS, пак от fstab, и със същите опции, нейния mount-point вече е на група users?!
Активен

vic_semionov

  • Напреднали
  • *****
  • Публикации: 144
    • Профил
    • WWW
mount & permissions za ext3
« Отговор #3 -: Oct 20, 2004, 13:59 »
аа да бе да се таковам! '<img'>
оправих се. значи трябвало е да вляза в /mnt/stor и от там да chown-на ".", а не от директорията /mnt...
оказа се прав, sys7em
мерси
Активен

sys7em

  • Напреднали
  • *****
  • Публикации: 401
    • Профил
    • WWW
mount & permissions za ext3
« Отговор #4 -: Oct 20, 2004, 14:08 »
np  '<img'>
Активен

Европейци сме ний, ама все не сме дотам!. . . Прощавай, не е за чудо пак да се срещнем.

Подобни теми
Заглавие Започната от Отговора Прегледи Последна публикация
permissions program
Общ форум
hippo 3 2914 Последна публикация Jul 28, 2004, 13:46
от Hapkoc
File Permissions
Настройка на програми
avpr 1 1852 Последна публикация Dec 24, 2004, 12:35
от
K3b cd burninig permissions
Настройка на програми
JollyRoger 6 2900 Последна публикация Jan 10, 2005, 16:24
от Златко
RQ: SAmba Permissions Help!
Настройка на програми
ERROR_404 1 1981 Последна публикация Apr 11, 2005, 18:09
от gvend
ext3 mount Ubuntu 5.04
Настройка на програми
CyberBoy 9 3171 Последна публикация Jun 03, 2005, 19:25
от alabal