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

Unable to change owner/group of files using sshfs #17

Open
lcheylus opened this issue Jan 6, 2024 · 5 comments
Open

Unable to change owner/group of files using sshfs #17

lcheylus opened this issue Jan 6, 2024 · 5 comments

Comments

@lcheylus
Copy link

lcheylus commented Jan 6, 2024

I created a GH workflow with vmactions/openbsd-vm v1.0.4 to run a job (build of a Rust project on OpenBSD 7.4/stable).

I'm using sshfs to sync files between OpenBSD guest and Ubuntu host (GH runner): sync: sshfs

In a shell script used by my job on OpenBSD guest, I need to change owner/group of files using chown command.

Using the chown command, the run task fails:

Run 'run' in VM
/usr/bin/bash /home/runner/work/_actions/vmactions/openbsd-vm/v1.0.4/run.sh execSSHSH
  Config file: openbsd-7.4.conf
  chown: /home/runner/work/cargo-nextest-openbsd/cargo-nextest-openbsd/build.sh: Permission denied
  (...)
  chown: /home/runner/work/cargo-nextest-openbsd/: Permission denied
  exec shell: bash run.sh showDebugInfo
  /usr/bin/bash
  Config file: openbsd-7.4.conf
  ==================Debug Info====================
  /home/runner/work/_actions/vmactions/openbsd-vm/v1.0.4
 (...)
 Error: The process '/usr/bin/bash' failed with exit code 1

See my workflow logs https://github.com/lcheylus/cargo-nextest-openbsd/actions/runs/7428338886/job/20215523263 for details.

In run.sh script, sshfs runs with some options for files persmissions:

sshfs -o reconnect,ServerAliveCountMax=2,allow_other,default_permissions host:work $HOME/work

Is it possible to change these options to authorize to change owner/group of files from the guest ?

@lcheylus lcheylus changed the title Unable to change owner/group for files using sshfs Unable to change owner/group of files using sshfs Jan 6, 2024
@Neilpang
Copy link
Member

Neilpang commented Jan 6, 2024

what is the option?

@lcheylus
Copy link
Author

lcheylus commented Jan 6, 2024

I don't know which options to change to fix this issue. It needs further tests between a Linux host and an OpenBSD VM with fuse/sshs.

@Neilpang
Copy link
Member

Neilpang commented Jan 6, 2024

after the files are copied back to the Linux Host, you can use sudo to do anything.

@lcheylus
Copy link
Author

lcheylus commented Jan 6, 2024

With sshfs, files from OpenBSD VM are not copied back after end of job. Files between Linux host and OpenBSD guest are directly synced via a permanent SSH connection.

When I change permissions on OpenBSD VM with chown command, the errors occur because permissions are NOK on Linux host.

@Neilpang
Copy link
Member

Neilpang commented Jan 6, 2024

so, don't run chown in the vm, just run it after the test in the Linux host.

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

No branches or pull requests

2 participants