这里到底发生了什么?
root@bob-p7-1298c:/# ls -l /tmp/report.csv && lsof | grep "report.csv"
-rw-r--r-- 1 mysql mysql 1430 Dec 4 12:34 /tmp/report.csv
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
Run Code Online (Sandbox Code Playgroud) 我使用 FUSE 文件系统作为我自己的用户没有问题,但 root 无法访问我的 FUSE 安装。相反,任何命令都会给出Permission denied
. 如何授予 root 读取这些挂载的权限?
~/top$ sudo ls -l
total 12
drwxr-xr-x 2 yonran yonran 4096 2011-07-25 18:50 bar
drwxr-xr-x 2 yonran yonran 4096 2011-07-25 18:50 foo
drwxr-xr-x 2 yonran yonran 4096 2011-07-25 18:50 normal-directory
~/top$ fuse-zip foo.zip foo
~/top$ unionfs-fuse ~/Pictures bar
Run Code Online (Sandbox Code Playgroud)
我的用户yonran可以很好地阅读:
~/top$ ls -l
total 8
drwxr-xr-x 1 yonran yonran 4096 2011-07-25 18:12 bar
drwxr-xr-x 2 yonran yonran 0 2011-07-25 18:51 foo
drwxr-xr-x 2 yonran yonran 4096 …
Run Code Online (Sandbox Code Playgroud) 假设我使用 FUSE 客户端在/mnt/cloud
. 但是因为直接读取和写入文件/mnt/cloud
很慢,因为它必须通过互联网,所以我想缓存我正在读取和写入云存储的文件。由于我可能一次写入大量数据,因此缓存应该位于我的磁盘上而不是 RAM 中。但是我不想在我的磁盘上复制整个云存储,因为我的磁盘可能太小了。
所以我想有一个缓存视图到/mnt/cloud
mount at /mnt/cloud_cache
,它使用另一个路径,比如/var/cache/cloud
缓存位置。
如果我现在阅读/mnt/cloud_cache/file
,我希望发生以下情况:
检查是否file
缓存在/var/cache/cloud/file
.
file
通过从/mnt/cloud
. 如果它是最新的,则从缓存中提供文件,否则转到 2。/mnt/cloud/file
到/var/cache/cloud/file
缓存并从缓存中提供。当我写信给 时/mnt/cloud_cache/file
,我希望发生这种情况:
/var/cache/cloud/file
并记录在file
需要回写的日记中/mnt/cloud
/var/cache/cloud/file
完成和/或之前的回写/mnt/cloud
完成/var/cache/cloud/file
到/mnt/cloud
我有以下要求和限制:
/mnt/cloud_cache
对缓存机制是透明的,并且像任何其他挂载的文件系统一样工作/mnt/cloud
)并不是非常重要,因为我一次可能只有一个客户端访问/mnt/cloud
,但如果有的话会很好。我花了很多时间寻找现有的解决方案,但没有找到任何令人满意的东西。
我的/etc/fuse.conf
文件中有以下内容:
# Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#
#mount_max = 1000
# Allow non-root users to specify the 'allow_other' or 'allow_root'
# mount options.
#
user_allow_other
Run Code Online (Sandbox Code Playgroud)
但是当我尝试使用选项挂载远程路径时allow_other
:
> sshfs name@server:/remote/path /local/path -o allow_other
Run Code Online (Sandbox Code Playgroud)
我得到:
fusermount: failed to open /etc/fuse.conf: Permission denied
fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
Run Code Online (Sandbox Code Playgroud)
正如我上面复制的那样,我已经三重检查了该选项user_allow_other
在我的fuse.conf
.
我也执行了sudo adduser my_user_name fuse
(虽然不确定是否需要这样做),但我仍然遇到同样的问题。
为什么不能/etc/fuse.conf …
当我运行时mount
,我可以看到我的硬盘安装为fuseblk
.
/dev/sdb1 on /media/ecarroll/hd type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
Run Code Online (Sandbox Code Playgroud)
但是,fuseblk
并没有告诉我设备上的文件系统是什么。我发现它正在使用,gparted
但我想知道如何使用命令行实用程序找到 fs。
我尝试 sshfs 挂载远程目录,但挂载的文件不可写。我已经没有想法或方法来调试这个了。有什么我应该在远程服务器上检查的吗?
我使用的是 Xubuntu 14.04。我挂载了 14.04 Ubuntu 的远程目录。
local $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
Run Code Online (Sandbox Code Playgroud)
我改变了/etc/fuse.conf
local $ sudo cat /etc/fuse.conf
# /etc/fuse.conf - Configuration file for Filesystem in Userspace (FUSE)
# Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#mount_max = 1000
# Allow non-root users to specify the allow_other or allow_root mount options.
user_allow_other
Run Code Online (Sandbox Code Playgroud)
我的用户在保险丝组中
local …
Run Code Online (Sandbox Code Playgroud) 我只想能够探索保管箱文件系统,而无需在 CPU、内存、存储上增加太多负载(即,无需在本地保存远程文件的副本)。似乎官方客户端消耗了很多资源(并且会执行同步等不必要的操作)- http://www.lowendtalk.com/discussion/3179/dropbox-memory-usage-on-linux。
是否可以简单地挂载它(例如,使用 FUSE,而不在本地复制文件)并使用通常的 Unix 实用程序(ls
, du
, cp
)浏览文件?(我想要 public.me.com 类似的东西:-likewget -r
或 FUSE。)
Dropbox-Uploader(使用 dropbox API 访问它的 bash 脚本)可以帮助以 Unix 方式访问 dropbox。但不幸的是,它不支持递归下载目录(如wget -r
),这就是为什么我宁愿在它上面有一个 FUSE 包装器。
我有一个目录,它总是存储很少(每周)使用的文本文件。当然,这是使用压缩的好地方。但是,每次我想访问文件时都不必使用 tar,如果我可以“安装压缩文件夹”,我会喜欢它。
假设该文件夹名为 mydir
理想情况下,以下情况应该是正确的:
如果我错了,请纠正我:为了在我的计算机上工作,使用名为 Debian 的 GNU/Linux 发行版,我知道两种输入命令、启动应用程序、打开文件等的方法:
有一个名为“窗口管理器”的东西。当我使用 GNU/Linux 时,我确实在X-Window 系统上工作[据我所知]。
原帖
情况:我禁用/etc/fstab
了 USB 记忆棒的自动挂载[例如/dev/sdb1
]。挂载需要是root
,或者至少是命令行上的一个sudo
条目,而不是窗口管理器 (!) 中的一个条目。我的意思不是automount
,我的意思是在窗口管理器中“单击符号”可以毫无问题地打开 GUI 上的设备,在 CLI 上必须是 root 用户。
问题:在 GUI 中安装如何“在幕后”工作?是否有config
用于窗口管理器的文件,还是必须单独设置?
我确实理解和使用mount
命令,我想了解如何阅读和配置/etc/fstab
并知道在哪里查看条目的/etc/mtab
含义和含义。
fuse ×10
filesystems ×3
sshfs ×2
automounting ×1
cache ×1
cloud ×1
compression ×1
dropbox ×1
linux ×1
lsof ×1
mount ×1
permissions ×1
privileges ×1
protocols ×1
ssh ×1
tar ×1
wget ×1