0

in shared directory f:/dir on Win2008 absolute symlink created with

mklink f:/dir/symlink2file f:/dir/file

This share then mounted in Debian with

mount -t cifs -o file_mode=0600,user=login,pass=passwd //host/share /mountpoint

And file /mountpoint/symlink2file is not recognized as symbolic link, so I can't get size of target file.

mount output:

#mount
//host/share on /mountpoint type cifs (rw,relatime,sec=ntlm,unc=\\192.168.0.40\share,username=login,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.40,file_mode=0600,dir_mode=0755,nounix,serverino,rsize=65535,wsize=65536,actimeo=1,user=login)

stat output:

#stat -L /mountpoint/symlink2file

  File: `/mountpoint/symlink2file'
  Size: 0               Blocks: 0          IO Block: 16384  regular empty file
Device: 12h/18d Inode: 3659174697239319  Links: 1
Access: (0600/-rw-------)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-01-26 14:34:44.491487300 +0600
Modify: 2016-01-26 14:34:44.491487300 +0600
Change: 2016-01-26 14:45:06.012178900 +0600
 Birth: -

So two questions. What should I do to follow symlink and get target file size on mounted CIFS share? Why 'nounix' presented in mount output and how to get rid of it in mount options?

0

Symlinks With absolute paths does not work on a cifs share. Try to remake them using relative paths. (e.g. in your case:

cd f:\dir
mklink file2symlink file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.