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

GHT record feature writes to inaccessible directory from snap #253

Open
wolsen opened this issue Nov 5, 2024 · 1 comment · May be fixed by #255
Open

GHT record feature writes to inaccessible directory from snap #253

wolsen opened this issue Nov 5, 2024 · 1 comment · May be fixed by #255

Comments

@wolsen
Copy link

wolsen commented Nov 5, 2024

The ght recording feature added in PR#249 attempts to write the screen recording files to the ~/.ght/recordings folder, however the snap does not have permissions to access this folder as snaps do not have access to hidden folders in the user's home directory by default. While this permission can be added, there is no need to actually store the recordings in this folder and instead the $SNAP_USER_COMMON directory can be used instead (e.g. ~/snap/ght/common/recordings).

Steps to recreate

$ sudo snap install ght --channel latest/edge
$ ght assign -i --record

Expected outcome
A recording of the chrome session to be successfully saved in a local directory.

Actual outcome

wolsen@violet:~ $ ght assign -i --record
[Error: EACCES: permission denied, open '/home/wolsen/.ght/recordings/ght_recording_2024-11-05T21-20-32-082Z.mp4'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'open',
  path: '/home/wolsen/.ght/recordings/ght_recording_2024-11-05T21-20-32-082Z.mp4'
}
? Your Ubuntu One email: ‣ wolsen@violet:~ $
@wolsen
Copy link
Author

wolsen commented Nov 5, 2024

I'll note that this works fine from the dev instance using yarn dev assign -i --record, but does not work within the confines of a snap. This does not appear that it was caught in testing because the installation used the --devmode flag, which allows does not enforce the confinement and simply records apparmor errors in the kernel logs.

@wolsen wolsen linked a pull request Nov 5, 2024 that will close this issue
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 a pull request may close this issue.

1 participant