Thread: Web development, git, and file permissions
hi.
posting see what's common approach in situation:
- doing web development wit git behind it, , in pc have apache configured userdir mod. local repo in public html. got site , running after setting less restrictive permissions repo.
thing if when pull remotely did not exist in local repo, new files , folders created default permissions, , cannot read apache. same when 1 creating new files , commiting.
so, each new file appears in repo, need go , change permissions. little annoying....
guys avoid this?
thank you.
there package called incron can configure monitor directory.
can create rule such whenever new file created in directory, command or script executed. command, example, run
(there ways tailor command specific file created, don't have use -r flag too...)code:chmod -r 755 /var/www chown -r www:www /var/www
problem may affect incron monitors fixed directories , not expand monitoring dynamically include subdirectories. if git creates subdirectory, i'm not confident incron execute script when files created in subdirectory.
possible solution if turns out problem use dirmon (see http://ubuntuforums.org/showthread.php?t=1104716). monitor directories "recursively".
advantage of incron comes official repos. dirmon rink-a-dink script wrote.
ps. if "apt-cache search inotify" find alternative ways directory monitoring. (gamin, inoticoming, inotify-tools, iwatch. don't have experience these, however.)
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Web development, git, and file permissions
Ubuntu
Comments
Post a Comment