我在VirtualBox下运行了FreeNAS。当我尝试在Ubuntu 12.10中挂载我的FreeNAS共享之一时,对该共享的权限使我无法进入目录,列出文件或创建文件。
我的意图是提供一个共享,其中FreeNAS john
帐户具有完全权限,并且barbara
和mark
帐户具有只读访问权限。但是,已挂载的共享的权限使我什至无法列出目录,更不用说在那里创建或读取任何文件了。
装入共享时我做错什么了吗?
我将尝试在下面提供更多信息。
我按照此处的说明设置了FreeNAS 。结果存储空间如下所示:
(我知道我需要调整该组的写权限。)
在Windows7下,安装共享没有问题:
C:\Users\John>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : Orion
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : dibnatri.net
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . : dibnatri.net
Description . . . . . . . . . . . : Intel(R) Centrino(R) Wireless-N 1030
Physical Address. . . . . . . . . : [redacted]
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.1.100(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Tuesday, May 14, 2013 6:47:24 AM
Lease Expires . . . . . . . . . . : Friday, June 20, 2149 1:24:02 PM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 192.168.1.1
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : dibnatri.net
Description . . . . . . . . . . . : Realtek PCIe FE Family Controller
Physical Address. . . . . . . . . : [redacted]
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
[snip]
C:\Users\John>net use
New connections will be remembered.
There are no entries in the list.
C:\Users\John>net use y: /user:john \\192.168.1.20\Tunes
The password is invalid for \\192.168.1.20\Tunes.
Enter the password for 'john' to connect to '192.168.1.20':
The command completed successfully.
Y:\>net use
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
OK Y: \\192.168.1.20\Tunes Microsoft Windows Network
The command completed successfully.
C:\Users\John>y:
Y:\>dir
Volume in drive Y is Tunes
Volume Serial Number is 1D20-98EC
Directory of Y:\
05/14/2013 06:54 AM <DIR> .
05/13/2013 02:58 PM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 6,131,715,282,944 bytes free
Y:\>copy con test1
sss
^Z
1 file(s) copied.
Y:\>dir
Volume in drive Y is Tunes
Volume Serial Number is 1D20-98EC
Directory of Y:\
05/14/2013 06:56 AM <DIR> .
05/13/2013 02:58 PM <DIR> ..
05/14/2013 06:56 AM 5 test1
1 File(s) 5 bytes
2 Dir(s) 6,131,715,447,808 bytes free
Y:\>type test1
sss
但是,尝试在Ubuntu下做同样的事情也不可行:
[johnd:~] $ ifconfig
eth0 Link encap:Ethernet HWaddr [redacted]
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:215 errors:0 dropped:0 overruns:0 frame:0
TX packets:215 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20073 (20.0 KB) TX bytes:20073 (20.0 KB)
wlan0 Link encap:Ethernet HWaddr [redacted]
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::4e80:93ff:fe0c:f3a0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2287 errors:0 dropped:0 overruns:0 frame:0
TX packets:1980 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1669164 (1.6 MB) TX bytes:761260 (761.2 KB)
[johnd:~] $ sudo mount -l
[sudo] password for johnd:
/dev/sda5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
/dev/sda6 on /home type ext4 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfsd-fuse on /run/user/johnd/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=johnd)
[johnd:~] $ ls /mnt/
[johnd:~] $ sudo mkdir /mnt/tunes
[johnd:~] $ ls -l /mnt/
total 4
drwxr-xr-x 2 root root 4096 May 14 07:04 tunes
[johnd:~] $ ls -l /mnt/
total 4
drwxr-xr-x 2 root root 4096 May 14 07:04 tunes
注意/mnt/tunes
上面的权限和所有者。它即将改变,尽管我不知道这是否是预期的/正确的。
[johnd:~] $ sudo mount -t cifs //192.168.1.20/Tunes /mnt/tunes -o rw,user=john
Password:
[johnd:~] $ ls -l /mnt/
total 0
drwxrwx--- 2 1001 1003 0 May 14 06:56 tunes
1001
是john
我的FreeNAS上的uid ,1003
也是users
那里的助手。 john
应该具有完全访问权限。
[johnd:~] 1 $ ll /mnt/tunes
ls: cannot open directory /mnt/tunes: Permission denied
[johnd:~] 1 $ cat>/mnt/tunes/test2
bash: /mnt/tunes/test2: Permission denied
[johnd:~] 2 $
我在这里做错了什么?
请注意,我对Linux很满意,但我绝不是专家。还有很多我不知道的权限,股份等
—
约翰Dibling
您可能需要通过在安装电话CIFS凭证(已经有一段时间我与CIFS挂接工作),但检查此链接askubuntu.com/questions/72471/...
—
rtmie
如果您尝试以超级用户身份登录,可以列出吗?复制?R M ?
—
codeScriber
@John Dibling为什么不在同一目录上创建CIFS共享和NFS共享?然后,您可以为特定组设置权限,并将John添加到可写组,将Barbara和Mark添加到只读组?
—
BsdHelper
@BsdHelper:我想这将适用于* nix客户端,但是Windows不会讲NFS,因此我需要来自世界任何地方的读/写访问权限。自从我发布这个问题以来,我已经完全放弃了FreeNAS,并采取了自己动手做的方法。我现在有一台运行5 TB raid 5阵列的linux服务器,并且在各处都设置了正确的权限。原来我根本不需要FreeNAS。感谢您的建议。
—
John Dibling 2013年