LINUX.ORG.RU
ФорумAdmin

При сохранении изменённого файла по сети: Неожиданная ошибка: Not a directory


0

0

вот моя проблема

wer@wer-work:~$ echo 111 > /media/lan/share/1111/plot.log

bash: /media/lan/share/1111/plot.log: Not a directory

wer@wer-work:~$ ls -l /media/lan/share/1111/plot.log

-rwxrwxrwx 1 wer wer 319 2008-12-16 14:19 /media/lan/share/1111/plot.log

строчка монтирования

#lan

//192.168.0.101/Volume_1-1 /media/lan cifs auto,dev,user=sgmeng/user,pass=xxxxxxx,uid=1000,gid=1000,iocharset=utf8 0 0

могу удалять, переименовывать, копировать, а ИЗМЕНЯТЬ НЕТ. на вендовых машинах всё нормально

это конфиг nas, который раздаёт файлы

[code]

[ global ]

interfaces = egiga0

unix charset = UTF8

workgroup = sgmeng

netbios name = DataStorage

server string = Dlink DNS-323

hosts allow =

hosts deny =

security = SHARE

encrypt passwords = yes

max log size = 0

socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536

max xmit = 65535

create mask = 0777

directory mask = 0777

force create mode = 0777

force directory mode = 0777

load printers = Yes

printcap name = /usr/local/LPRng/etc/printcap

min print space = 2000

max print jobs = 1000

printing = lprng

print command = /usr/local/LPRng/bin/lpr -P%p -r %s

lpq command = /usr/local/LPRng/bin/lpq -P%p

lprm command = /usr/local/LPRng/bin/lprm -P%p %j

lppause command = /usr/local/LPRng/sbin/lpc hold %p %j

lpresume command = /usr/local/LPRng/sbin/lpc release %p %j

queuepause command = /usr/local/LPRng/sbin/lpc -P%p stop

queueresume command = /usr/local/LPRng/sbin/lpc -P%p start

use sendfile =yes

[ Volume_1-1 ]

comment =

path = /mnt/HD_a2/Volume_1

valid users = andrey user buh svyatoslav

read only = no

guest ok = no

oplocks = yes

map archive = yes

[/code]

решил http://www.zeitoun.net/articles/dsn323-samba-dfs-bug/start

проблема была в NAS Dlink-323 так его и так!

How to workaround the DFS samba bug on the DNS323 NAS ?

Firstly, here is a quick bug description: It's impossible to modify any existing files. The “Not a directory” or “No such file or directory” or “touch: setting times of…” errors occurs when trying to modify a file.

If your linux cifs or smbfs client support the nodfs flag (integrated in kernels > 2.6.27). You just have to add this option to the mount command. Example:

mount -t cifs -o credentials=/home/kerphi/.smb-zekra-credentials,iocharset=utf8,file_mode=0777,d ir_mode=0777,nodfs //zekra/Volume_1 /home/kerphi/zekra

If you cannot upgrade your kernel (like me because i'm following the debian releases), you have to follow this workaround:

* Connect to the DNS323 using the web GUI and goto tools→system. * Save the configuration to your workstation (in “CONFIGURATION SETTINGS” section). * After saving edit the file and just under this line:

;[ global ]

add the following line:

msdfs root = no

* Then upload this file through the web interface, your NAS will reboot and you will be able to modify existing file again !

Belyaev_Nikolay
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.