Как можно установить права доступа к каталогу, чтобы группа могла и читать, и записывать в него файлы? (Независимо от того, кто создал файл)

Это старая тема, но я выложу то, что нашел в руководстве по смартду:

-U ID[+]

          [ATA only] Report if the number of offline uncorrectable sectors
          is  non-zero. Here ID is the id number of the Attribute whose
          raw value  is  the  Offline  Uncorrectable  Sector  count.   The
          allowed  range  of  ID  is 0 to 255 inclusive.  To turn off this
          reporting, use ID = 0.  If the -U ID option is not  given,  then
          it  defaults to -U 198 (since Attribute 198 is generally used to
          monitor offline uncorrectable sectors).  If  the  name  of  this
          Attribute  is  changed  by  a  '-v  198,FORMAT,NAME' (except '-v
          198,FORMAT,Offline_Scan_UNC_SectCt'), directive, the default  is
          changed to -U 0.

          If  '+'  is specified, a report is only printed if the number of
          sectors has increased since the last check cycle. **Some disks  do
          not  reset this attribute when a bad sector is reallocated.**  See
          also '-v 198,increasing' below.

Таким образом, добавление опции -U 198+ должно делать именно то, что вы хотите.

0
28.09.2020, 18:32
1 ответ

Если система и файловая -система поддерживают списки ACL типа posix -draft -, вы можете:

setfacl -m d:g::rw./shared

Чтобы вновь созданные файлы автоматически получали разрешение на чтение и запись для группы, даже если umaskпроцессов, создающих эти файлы, обычно не предоставляют эти разрешения.

В любом случае это не мешает пользователям впоследствии удалять эти разрешения с помощью chmod/ setfacl.

0
18.03.2021, 23:01

Теги

Похожие вопросы