View previous topic :: View next topic |
Author |
Message |
lamekain Guru
Joined: 25 Nov 2003 Posts: 331 Location: Helsinki, Finland
|
Posted: Sat Feb 21, 2004 9:46 am Post subject: multiple users working in one directory. how? |
|
|
Hi,
me and a friend of mine are involved in a website-project. I have an Apache2 and SSHD running on my box. He connects to the box with SSH and we work on the project located in my ~/www/projectName/.
The problem is that when we work on the files and save them they become non-writable for the other side. Eg. when I save the changes I made to foo.php, my friend can't change the file unless I do a "chmod g+w foo.php").
Is it possible to make the files keep their permissions after saving them? I have heard that one can change the file-creation-mask or something, but could I make a change that only affected the projectName directory?
And using ACLs or a CVS server is tempting, but I'm looking for a simple solution. Thanks for any help people! _________________ "Only when the last tree has died, the last river been poisoned,
and the last fish been caught, will we realize we cannot eat money"
-Global Terrorism.org |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Sat Feb 21, 2004 1:55 pm Post subject: |
|
|
CVS would be the best way forward, otherwise check your umask. There's no way to set umasks for a specific directory, but you could write an alias:
Code: | alias webumask='umask g+w; cd ~/www/projectName/'
alias uwebumask='umask g-w; cd' |
_________________ Search | Read | Answer | Report | Strip |
|
Back to top |
|
|
CMI Apprentice
Joined: 19 Aug 2003 Posts: 205
|
Posted: Sat Feb 21, 2004 7:26 pm Post subject: |
|
|
- You can use umask and set it to 002 to make files be created with permissions 664 by default (ug=rw, o=r).
- You can change primary groups (the GID listed in /etc/passwd, not extra groups) to match if you have group owner issues.
- You can do what I do, and have a cron job run as root clean up owners and permissions on a regular basis.
- You can use Samba (or something else probably) to connect using your own information, but let Samba force user and group owners and permissions for you. _________________ SECOMGroup - Lineman.net
LightPHPCMS - PhotoGallery |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|