Incron - Automated shared file permission fixing

An automated host side mechanism to seamlessly fix file permissions for the shared folder whenever new files are moved into it from the guest so they are viewable on the host. This could be shipped on Kicksecure host

Suggestions/improvements welcome:

sudo apt-get install incron

list the current rules:

# incrontab -l

error

user ‘root’ is not allowed to use incron

Error may be fixed in one of two ways:
Allow the root user to make use of incron: By editing /etc/incron.allow, adding ‘root’ to it.

Allowing all local users the ability to use incron: By removing the file /etc/incron.allow.
sudo rm -f /etc/incron.allow

Edit rules file to add file action masks that trigger the predefined command/script:
sudo incrontab -e

Add:
/home/user/shared IN_CREATE,IN_NO_LOOP sudo chmod 777 -R /home/user/shared

To restart and apply new settings:
sudo incrontab -d

1 Like

Sounds quite useful if your UID on the host is something other than 1000.