Форум русскоязычного сообщества Ubuntu


Увидели сообщение с непонятной ссылкой, спам, непристойность или оскорбление?
Воспользуйтесь ссылкой «Сообщить модератору» рядом с сообщением!

Автор Тема: usbmount - как выставить права на запись по умолчанию?  (Прочитано 2327 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн denfox

  • Автор темы
  • Новичок
  • *
  • Сообщений: 19
    • Просмотр профиля
Установил usbmount на debian систему (сразу извиняюсь если не тот раздел, но думаю что принципиальной разницы быть не должно), при этом все отлично работет и USB устройства монтируются куда надо.

Одно НО: по умолчанию они монтируются без прав на запись всем, кроме рута.

в /etc/usbmount есть файл usbmount.conf, где собственно лежат конфиги на эту софтину.
Проблема в том что я совершенно не знаю что туда писать.

Если кто знает - помогите пожалуйста.
Заранее спасибо.

Оффлайн victor00000

  • Старожил
  • *
  • Сообщений: 15568
  • Глухонемой (Deaf)
    • Просмотр профиля
cat /etc/usbmount/usbmount.conf?
Wars ~.o

Оффлайн denfox

  • Автор темы
  • Новичок
  • *
  • Сообщений: 19
    • Просмотр профиля
# Configuration file for the usbmount package, which mounts removable
# storage devices when they are plugged in and unmounts them when they
# are removed.

# Change to zero to disable usbmount
ENABLED=1

# Mountpoints: These directories are eligible as mointpoints for
# removable storage devices.  A newly plugged in device is mounted on
# the first directory in this list that exists and on which nothing is
# mounted yet.
MOUNTPOINTS="/media/usb0 /media/usb1 /media/usb2 /media/usb3
             /media/usb4 /media/usb5 /media/usb6 /media/usb7"

# Filesystem types: removable storage devices are only mounted if they
# contain a filesystem type which is in this list.
FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus"

#############################################################################
# WARNING!                                                                  #
#                                                                           #
# The "sync" option may not be a good choice to use with flash drives, as   #
# it forces a greater amount of writing operating on the drive. This makes  #
# the writing speed considerably lower and also leads to a faster wear out  #
# of the disk.                                                              #
#                                                                           #
# If you omit it, don't forget to use the command "sync" to synchronize the #
# data on your disk before removing the drive or you may experience data    #
# loss.                                                                     #
#                                                                           #
# It is highly recommended that you use the pumount command (as a regular   #
# user) before unplugging the device. It makes calling the "sync" command   #
# and mounting with the sync option unnecessary---this is similar to other  #
# operating system's "safely disconnect the device" option.                 #
#############################################################################
# Mount options: Options passed to the mount command with the -o flag.
# See the warning above regarding removing "sync" from the options.
MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime"

# Filesystem type specific mount options: This variable contains a space
# separated list of strings, each which the form "-fstype=TYPE,OPTIONS".
#
# If a filesystem with a type listed here is mounted, the corresponding
# options are appended to those specificed in the MOUNTOPTIONS variable.
#
# For example, "-fstype=vfat,gid=floppy,dmask=0007,fmask=0117" would add
# the options "gid=floppy,dmask=0007,fmask=0117" when a vfat filesystem
# is mounted.
FS_MOUNTOPTIONS=""

# If set to "yes", more information will be logged via the syslog
# facility.
VERBOSE=no

Оффлайн victor00000

  • Старожил
  • *
  • Сообщений: 15568
  • Глухонемой (Deaf)
    • Просмотр профиля
Цитировать
VERBOSE=no
заменить
VERBOSE=yesрестарту
и подключить флешку то лог
dmesg | tailили
cat /var/log/syslog | tail

Пользователь решил продолжить мысль 25 Августа 2013, 20:40:45:
Цитировать
# For example, "-fstype=vfat,gid=floppy,dmask=0007,fmask=0117" would add
# the options "gid=floppy,dmask=0007,fmask=0117" when a vfat filesystem
# is mounted.
FS_MOUNTOPTIONS=""
заменить
FS_MOUNTOPTIONS="gid=пользователь,uid=пользователь"папробувать надо.
« Последнее редактирование: 25 Августа 2013, 20:40:45 от victor00000 »
Wars ~.o

Оффлайн denfox

  • Автор темы
  • Новичок
  • *
  • Сообщений: 19
    • Просмотр профиля
Вот лог после включения Vebose и подключения флешки:

Aug 26 19:10:55 raspi usbmount[2379]: acquired lock /var/run/usbmount/.mount.lock
Aug 26 19:10:55 raspi usbmount[2379]: /dev/sdb does not contain a filesystem or disklabel
Aug 26 19:10:56 raspi usbmount[2403]: loaded usbmount configurations
Aug 26 19:10:56 raspi usbmount[2403]: trying to acquire lock /var/run/usbmount/.mount.lock
Aug 26 19:10:56 raspi usbmount[2403]: acquired lock /var/run/usbmount/.mount.lock
Aug 26 19:10:56 raspi usbmount[2403]: /dev/sdb1 contains filesystem type vfat
Aug 26 19:10:56 raspi usbmount[2403]: mountpoint /media/usb0 is available for /dev/sdb1
Aug 26 19:10:56 raspi usbmount[2403]: executing command: mount -tvfat -osync,noexec,nodev,noatime,nodiratime /dev/sdb1 /media/usb0
Aug 26 19:10:56 raspi usbmount[2403]: executing command: run-parts /etc/usbmount/mount.d
Aug 26 19:10:56 raspi usbmount[2403]: usbmount execution finished

Цитировать
FS_MOUNTOPTIONS="gid=пользователь,uid=пользователь"
Пробовал, подставляя соответственно uid и gid (в числовом виде) пользователя. Не помогло, все равно монтируется в рид-онли для юзера.


 

Страница сгенерирована за 0.023 секунд. Запросов: 22.