правильным ли будет их добавить в строку?
- Code: Select all
[ "$fs" = 'ext3' ] && exportfs -o rw,async,insecure,no_root_squash,no_subtree_check,anonuid=0,anongid=0, *:$mt
[ "$fs" = 'ext3' ] && exportfs -o rw,async,insecure,no_root_squash,no_subtree_check,anonuid=0,anongid=0, *:$mt
mount -t nfs -o nolock 192.168.1.10:/tmp/usbmounts/sdb1 /Volumes/NFS
nfs://192.168.1.10/tmp/usbmounts/sdb1
nfs://192.168.1.10/tmp/usbmounts/sdb1
mount -t nfs -o nolock 192.168.1.10:/tmp/usbmounts/sdb1 /Users/name/Desktop/NFS
#!/bin/sh
case "$1" in
start)
/usr/local/etc/mos/bin/wait_mount && exit 1
/etc/init.d/K60nfs start
cIFS=$IFS
IFS="
"
for s in $( cat /proc/mounts ) ; do
IFS=$cIFS
echo $s | grep -q '^/dev/scsi/host' || continue
mt=$( echo $s | cut -d ' ' -f 2 )
fs=$( echo $s | cut -d ' ' -f 3 )
[ "$fs" = 'ext3' ] && exportfs -o rw,insecure,no_root_squash,no_subtree_check,anonuid=0,anongid=0, *:$mt
done
;;
stop)
/etc/init.d/K60nfs stop
;;
*)
;;
esac
exit $?
Разве NFS не должен быть быстрее Samba? Правда в muCommander из-под MacOS я также не добился выдающихся скоростей в NFS - 2-2,5 Мб. Но грешу за это на muCommandergrayman wrote:С клиентом встроенным в windows не получилось (не видит "сетевой путь", при том, что showmount его видит), с помощью Nekodrive подключился сразу, но скорость не порадовала - 2,5 Mb (8 Mbit),
Забросил.
Если NFS сервер на линуксе а коннектимся к нему с мака то нужно при настройке nfs сервера явно указывать all_squash,anonuid=1000,anongid=1000.
Попробуй что-то типа такого: exportfs -o rw,insecure,no_subtree_check,all_squash,anonuid=1000,anongid=1000 *:/tmp/usbmounts/sdb1
Использование all_squash вполне приемлимо так как для медиаплеера обычно нет смысла разделения прав по юзерам которые к нему подключаются по NFS.
Чтобы стало понятнее почему так, вкратце по опциям:
root_squash
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive, such as user bin or group staff.
no_root_squash
Turn off root squashing. This option is mainly useful for diskless clients.
all_squash
Map all uids and gids to the anonymous user. Useful for NFS-exported public FTP directories, news spool directories, etc. The opposite option is no_all_squash, which is the default setting.
anonuid and anongid
These options explicitly set the uid and gid of the anonymous account. This option is primarily useful for PC/NFS clients, where you might want all requests appear to be from one user. As an example, consider the export entry for /var/www/joe in the example section below, which maps all requests to uid 150 (which is supposedly that of user joe).
oral wrote:Спрошу у него почему anonuid=1000,anongid=1000, а не anonuid=0,anongid=0
Users browsing this forum: No registered users and 10 guests