Skip to content

Conversation

@Kunsi
Copy link
Contributor

@Kunsi Kunsi commented Aug 18, 2023

No description provided.

my $mntpath = $fuse->getMountPath($vid) or die 'Cannot get mount path';
print " creating directory '$mntpath' \n";
qx / mkdir -p "$mntpath" / or die 'Cannot create mount directory';
qx / mkdir -p "$mntpath" /;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this error check means you will execute a command on an either non-existing directory or one with very likely wrong permissions. I really think that there should be at least a bail-out from the current loop iteration. Alternatively it could be checked if the directory already exists and is writable, which would be a situation where this could work without write access to the parent directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are correct. After having thought about the problem i found the real issue. We run this script as user voc, but fuse-ts creates the mounts as root. If the mounts vanish, the mount directories are owned by root, thus mkdir -p fails. The hackaround is to run chown -R prior to running the script, but that does not seem like the best solution.

I will think about how we can solve this after camp.

Are you willing to cherry-pick the other commit, or should i create a new PR?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants