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
Additional permissions for removable media #190
Comments
Hi Alan, Thanks for doing the snap and thanks for the complimentary podcast last Sept. The change in question was done to try to determine what the filesystem of the target folder is. Thus we can see if we need to use NTFS/FAT restrictions on the characters that are allowed in file and folder names. From the backtrace you sent, it seems that the call to psutil.disk_partitions() is performing the scan you are seeing. This seems a bit extreme and I'm not particularly attached to the approach to discovering filesystem type. I'll do a little research for alternatives and get back to you soon. |
I have not been able to find a portable alternative to psutil.diskpartitions() and unfortunately, it wants to look in the mounts file (which makes sense). I've just spent quite a lot of effort in #185 trying to get this filesystem check to work for all cases, including a Windows subsystem for Linux Docker container connecting to an NTFS host file system. It's almost a moot change because it only slightly changes the restrictions on what characters are allowed in file names and album names. But I don't have an alternative that will not affect existing library backups. Does it makes sense for a snap to enable an auto-connect to the mounts file, are there security implications? |
Regarding maintenance of the snap, I'm happy for you to continue to do it assuming you would like to. I have very little knowledge of snaps. In fact, I tried yours but could not work out how to give it permission to write to the host filesystem. I assume that is possible? If I understood it better I might recommend snaps for deploying gphotos-sync since I've had some reasonably nasty issues recently with reliance on pipenv. |
I'm sorry, I didn't mean to push extra work on you due to snap confinement issues. I have requested the interface auto-connection. Obviously I'm super happy to continue maintaining the snap. FYI here's the growth over the last few months. Happy to debug why the snap doesn't work for you whenever you have time. |
That's great thanks. I'm curious, where does this auto connection go? The stats are nice, are the available for me to monitor? |
The process is basically:-
Hope that makes sense. |
I am having trouble with this right now. Running gohotos-sync with snap on Ubuntu 20.10 on a Rapberry Pi. Still got the following error: any ideas? |
I'm afraid I don't have much experience of snaps, maybe @popey can help? If not can you run outside of a snap? |
I think I might finally be making progress. |
Hey! I maintain the gphotos-sync snap in the Snap Store. In more recent builds I note there's been a change to the way gphotos-sync scans the filesystem. This causes the snap to crash, because confinement prevents it enumerating things in
/proc/*/mounts
(see traceback below).Now, this isn't a massive issue. I have modified the snap to add the
mount-observe
interface. This is a manually connected interface, so currently a user who installs the snap from the edge channel (which tracks git master) will need to manuallysnap connect gphotos-sync:mount-observe
. If they don't then the snap crashes. I can request an auto connection assertion for that interface if required, which means users won't need to do anything, and the app won't crash.My question is this: Is it expected that the application should enumerate
/proc/*/mounts
as part of normal behaviour (what is that doing?). If yes, then I can put the request in to ask for the interface to be auto connected, and hold off releasing to the stable channel until that's resolved. If the behaviour is not expected, then can I request the code is changed to not root around in/proc/*/mounts
? :)Here's the traceback.
We are planning a blog post around the application soon, so I just want to make sure I get the ducks in a row, so we don't promote it and break it at the same time :)
Finally, as always, I'm happy to contribute the snapcraft yaml to your code repo and hand the snap over to you, should you prefer that.
The text was updated successfully, but these errors were encountered: