4
2
I often run into this issue on Linux, and I'd love to know the proper way of solving it.
Say I have a daemon running. In my example, I'll use LigHTTPD, a webserver.
Some software, like Wordpress, enjoys having read/write access to files for updating applications via a web interface, which I think is quite handy.
At the same time, I enjoy being able to hack on my files using vim, using my local user account, 'eddie'.
Herein lies the rub. Either I chown everything to lighttpd or eddie and a shared group between them both, and chmod it 660, or perpetually sudo to edit the damned things. The former isn't a bad solution, until I create a new file in which case I have to remember to chmod it appropriately, or create some hack like a cron job that chmods for me.
Is there an easier way of doing this? Have I overlooked something?
Cheers,
-e-
you can probably do something with ACLs (filesystem dependent) to make access simple(r), but that's a ball of fun i've yet to tangle with, so hopefully someone else will enlighten us. – quack quixote – 2010-03-23T07:35:03.403
Yes it can be done with ACLs too, but most distros do not enable them by default and I think it's more difficult. It also allows more fine grained control though. See man setfacl if you're interested. – Kim – 2010-03-23T07:54:00.510