简体   繁体   English

如何在 linux Mint20.1 上挂载具有写入权限的苹果机场时间胶囊?

[英]How to mount apple Airport Time Capsule with write access on linux Mint20.1?

I recently got a Apple airport time capsule and I am trying to use the disk as a NAS.我最近得到了一个 Apple airport time capsule,我正在尝试将磁盘用作 NAS。

The problem I have is that when I mount the disk to a local folder, that the owner of the folder always changes to root.我遇到的问题是,当我将磁盘装载到本地文件夹时,该文件夹的所有者总是更改为 root。 So after mounting, I can see and access the files in the target folder, but it is only readonly.所以挂载后,我可以看到和访问目标文件夹中的文件,但它只是只读的。 I tried changing the owner of the folder, (sudo chown curruser /home/curruser/airptc), although this doesn't generate any errors it doesn't do anything.我尝试更改文件夹的所有者 (sudo chown curruser /home/curruser/airptc),尽管这不会产生任何错误,但它不会执行任何操作。 So the owner stays root.所以所有者保持根。

When I unmount the disk and then change the owner, it works like normal and the owner is back changed to curruser.当我卸载磁盘然后更改所有者时,它像正常一样工作,并且所有者又更改为 curruser。 After remounting the disk the same thing happens all over again.重新安装磁盘后,同样的事情再次发生。 The command I use to mount is:我用来挂载的命令是:

sudo mount.cifs //192.168.1.200/nas /home/curruser/airport/ --verbose -o username=airp-account-user,pass=airport-account-passw,sec=ntlm,vers=1.0,gid=$(id -g), uid=$(id -u),forcegid,forceuid, file_mode=0777, dir_mode=0777

I also tried adding rw as parameter, but this doesn't changes anything.我也尝试添加 rw 作为参数,但这并没有改变任何东西。 When I try to use this mounting command without sudo (in an attempt to avoid the changing of ownership), I get the following error:当我尝试在不使用 sudo 的情况下使用此安装命令时(试图避免更改所有权),我收到以下错误:

mount.cifs: permission denied: no match for /home/curruser/airport found in /etc/fstab mount.cifs:权限被拒绝:在 /etc/fstab 中找不到 /home/curruser/airport 的匹配项

Thanks in advance for the help.先谢谢您的帮助。 It would be great if I could get this thing up and running!如果我能启动并运行这个东西,那就太好了!

I'm on CentOS 8 and this worked for me:我在 CentOS 8 上,这对我有用:

  • Go to your TC, into Disk, click on Account and create a username and give it a password. Go 到您的 TC,进入磁盘,单击帐户并创建用户名并为其提供密码。 Save, then reboot your TC.保存,然后重启你的 TC。

  • Once it's restarted, make sure you can ping it from your *nix box.一旦它重新启动,确保你可以从你的 *nix 机器上 ping 它。

  • On your *nix box, create a directory where you'd normally mount stuff, ie /mnt/timecapsule .在你的 *nix 盒子上,创建一个你通常会挂载东西的目录,即/mnt/timecapsule

  • Then try to mount it with this:然后尝试用这个安装它:

     mount -rw -t cifs //IP/username //mnt/timecapsule/ -o username=username,password=password,sec=ntlm,vers=1.0

    which worked for me.这对我有用。 If you want it to automount each time you reboot your *nix box, add an entry to your /etc/fstab (but I find that confusing), so I just added a cron task to re-mount at reboot using:如果您希望它在每次重新启动 *nix 机器时自动挂载,请在 /etc/fstab 中添加一个条目(但我发现这令人困惑),所以我只是添加了一个 cron 任务以在重新启动时重新挂载,使用:

     crontab -e
  • Add into your crontab the whole mount command above.将上面的整个安装命令添加到您的 crontab 中。

  • Save and reboot to make sure it re-mounts.保存并重新启动以确保它重新安装。

It seems the username and the share in your IP/Destination_folder have to be the same, in your case:在您的情况下,您的 IP/Destination_folder 中的用户名和共享似乎必须相同:

//192.168.1.200/nas <- "nas" is where you put your username because the TC creates that shared folder name when you create the User account via the Disk tab in AirPort utility. //192.168.1.200/nas <- “nas”是您放置用户名的地方,因为当您通过 AirPort 实用程序中的“磁盘”选项卡创建用户帐户时,TC 会创建该共享文件夹名称。

Either change your username to "nas", or change your destination folder to //192.168.1.200/airp-account-user .要么将您的用户名更改为“nas”,要么将您的目标文件夹更改为//192.168.1.200/airp-account-user

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM