Odd directory that cannot be 'stat'-ed by root

troycarpenter

Renowned Member
Feb 28, 2012
103
8
83
Central Texas
I am trying to schedule a backup job for users' directories on a Linux desktop workstation. We utilize a network cloud storage solution called Seafile, and the Linux desktop utility that gives users access to their files creates and mounts to a directory, typically named "SeaDrive".

The directory in question as seen by the owner:
0 drwxr-xr-x 2 troy troy 4.0K Jan 2 17:16 SeaDrive

However, to the root user, it looks like this:
? d????????? ? ? ? ? ? SeaDrive

If root tries to stat that directory, it throws a permission error:
stat: cannot stat '/home/troy/SeaDrive': Permission denied

However, the owner can stat that directory just fine:
troy@neon-desktop:~$ stat SeaDrive
File: SeaDrive
Size: 4096 Blocks: 0 IO Block: 4096 directory
Device: 35h/53d Inode: 1 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 1000/ troy) Gid: ( 1000/ troy)
Access: 1969-12-31 18:00:00.000000000 -0600
Modify: 2022-01-02 17:16:42.000000000 -0600
Change: 1969-12-31 18:00:00.000000000 -0600

Birth: -

During a backup, I keep getting this error and as a result, the backup fails.
root@neon-desktop:~# proxmox-backup-client backup homedir.pxar:/home/troy --exclude /home/troy/SeaDrive/ --backup-id neon-homedirs
Starting backup: host/neon-homedirs/2022-01-25T19:17:44Z
Client name: neon-desktop
Starting backup protocol: Tue Jan 25 13:17:44 2022
No previous manifest available.
Upload directory '/home/troy' to 'pbs.mydomain.org PBS' as homedir.pxar.didx
catalog upload error - channel closed
Error: stat failed on "SeaDrive": EACCES: Permission denied


Given that the directory's contents are already stored on a cloud server, it doesn't need to be included in the backup. I have tried many different methods to exclude that directory, using both the --exclude directive AND a .pxarexclude file. The problem seems to be that, even though the directory is to be excluded, PBC is still trying to stat the directory.

When I run the backup client as the owner, the backup completes, and the excluded directory doesn't even show up in the archive (as expected). No, I don't want to have to create separate backup jobs for every user on the system. I strongly suspect the problem is with the mount directory as created by the seadrive program, but I can't expect end users to know that.

So the questions I have: Why can't root stat the directory (that answer probably lies with the Seafile team)? Why does PBC need to stat the directory during a backup? How do I get PBC to do the backup without having to stat that directory?
 
Last edited:
hi,

is it possible that there are ACLs set for that path? what happens with getfacl /path/to/that/directory

Why does PBC need to stat the directory during a backup?
everything needs to do a stat call to read file status (that's why you see the question marks in ls output too)

How do I get PBC to do the backup without having to stat that directory?
not sure if that can work
 
also check your fuse mount options, if you play with them for a bit maybe the issue will go away
 
Thanks for the reply. Here's the getfacl for that directory. I'm afraid it doesn't give much insight.

troy@neon-desktop:~$ getfacl /home/troy/SeaDrive
getfacl: Removing leading '/' from absolute path names
# file: home/troy/SeaDrive
# owner: troy
# group: troy
user::rwx
group::r-x
other::r-x

troy@neon-desktop:~$ sudo getfacl /home/troy/SeaDrive
[sudo] password for troy:
getfacl: /home/troy/SeaDrive: Permission denied


I'll play with some other settings as you mention to see what I can come up with. RIght now it looks like I just need to run a separate backup for and as each user in the /home directory.
 
hi,

is it possible that there are ACLs set for that path? what happens with getfacl /path/to/that/directory


everything needs to do a stat call to read file status (that's why you see the question marks in ls output too)


not sure if that can work
if there are some ACLs configured, how to backup that directory?
And what is the best practice with fuse mount ?
On some workstation PBS fail to backup when find fuse mounted path. I have to unmount it for each backup jobs?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!