mount -t cifs -o username=user,password=123456,gid=500,uid=500 //{ip}/upload /share/upload
mount: cannot mount block device //{ip}/result read-only
或mount: wrong fs type, bad option, bad superblock on \{ip}{dir}
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
yum search cifs
yum install -y cifs-utils
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
切换用户。
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
退出一次窗口。
提示:mount: //{ip}/upload is not a valid block device
windows上面FileUpload目录设置共享,命令修改为:
mount -t cifs -o username=user,password=123456 //{ip}/upload /share/upload
挂载时设置权限组,命令如下:mount -t cifs -o username=user,password=123456,gid=500,uid=500 //{ip}/upload /share/upload
500为www。
出现错误提示:mount.cifs: bad UNC (\{ip}/{dir})
正常为:
mount -t cifs -o username=user,password=123456 //{ip}/{dir} /share/upload
1、创建文件夹,修改拥有者权限
2、挂载 mount -t cifs -o username=guest,password=”“,gid=501,uid=501 //192.168.1.24/upload /share/upload
3、软链
cd /usr/local/nginx/html/website/
ln -s /share/upload upload
遇到的问题:
PHP写入文件时出现:The upload destination folder does not appear to be writable
解决方法:挂载时指定目录权限或者挂载命令增加gid=501,uid=501。
http://www.centoscn.com/image-text/config/2014/0718/3308.html
参考地址:
http://www.cnblogs.com/maning2018/p/6241462.html?utm_source=itdadao&utm_medium=referral
http://blog.sina.com.cn/s/blog_544f183101013zd7.html
http://blog.csdn.net/pearhuaer/article/details/8681359