SGID - setgid for directory sharing
Just learned about SGID:
"SGID (set group ID) on a directory: in this special case every file created in the directory will have the same group owner as the directory itself (while normal behavior would be that new files are owned by the users who create them). This way, users don't need to worry about file ownership when sharing directories"
Sounds like just the ticket for my /mnt/video/ directory, where mythbackend writes to it while running as root, but I want to view/delete said videos from my user login.
chmod g+s video
You just replace the x with s in the normal chmod command. Time will tell if it works.
If that fails I can try setuid/SUID instead. And just to tidy things up, I've also changed the group of everything there from users to myth, which should hopefully stay that way going forward:
chgrp myth /mnt/video/*
No comments:
Post a Comment