Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kunsi fix restores #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Kunsi
Copy link
Contributor

@Kunsi Kunsi commented Aug 18, 2023

No description provided.

@@ -63,7 +63,7 @@
my $fuse = CRS::Fuse->new($props) or die 'Fuse lib is missing';
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