fdopendir:运行 updateb 时权限被拒绝

fdopendir:运行 updateb 时权限被拒绝

我尝试使用以下命令对 NAS(TerraMaster F4-210)上的文件建立索引:

updatedb -l 0 -o /home/jake/nas-index.db -U /mnt/nas/

运行一段时间后,它因错误而终止:

fdopendir: Permission denied

/home/jake/nas-index.db 没有创建文件

它是通过以下命令安装的:

mount -t cifs -o "username=jake,password=mypass" //10.0.0.127/jake /mnt/nas/
mount | grep nas
//10.0.0.127/jake on /mnt/nas type cifs (rw,relatime,vers=3.1.1,cache=strict,username=jake,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.0.127,file_mode=0755,dir_mode=0755,soft,nounix,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)

我的用户可以读取和写入它。例如我可以这样做:

$> cd /mnt/nas
$> ls -al myfile.txt
ls: cannot access 'myfile.txt': No such file or directory
$> touch myfile.txt
$> ls -al myfile.txt
-rwxr-xr-x 1 root root 0 Feb 24 01:36 myfile.txt*
$> cat myfile.txt
$> echo "foo" >> myfile.txt
$> cat myfile.txt
foo
$> rm myfile.txt
$> ls -al myfile.txt
ls: cannot access 'myfile.txt': No such file or directory

这样我就可以创建、追加、读取和删除文件。

我什至尝试以root身份运行updatedb命令。

为了确保我不会意外忽略路径或文件系统,我注释掉了 /etc/updatedb.conf 中的所有内容。

我不知道接下来要尝试什么。

这是怎么回事?我该如何解决?

提前致谢。

相关内容