Page 1 of 1
Advice Wanted : Best Linux user and group owner
Posted: Fri Jan 11, 2008 12:44 am
by kendo451
I have tried making apache the owner of all the files, but then when I upgrade the version of CMSMS with an ftp user account, I hit file permissions problems. It's a pain to have to login as root and copy the files, especially as many CMSMS users don't have root access to their server.
For setting up CMSMS on a Linux server, what is the most trouble-free configuration for the group and user owership for the files in the CMSMS directories?
Re: Advice Wanted : Best Linux user and group owner
Posted: Fri Jan 11, 2008 12:56 am
by calguy1000
The answer to this is simple. There is no exact answer.
It depends on your hosts configuration, the uids, gid's of each applicable user, the default permissions of 'root' directory, and what secondary groups that each of those uers are members of.
This is a standard problem related to all CMS packages on hosted environments.... the best answer I can give you is to do alot of research, alot of learning, and some experimenting. There is no absolute answer to this question, and even if I were to give you an answer that worked for you for this host that you're using it may not work for the next.... therefore... research is your best answer.
Lookup subjects like 'unix permissions', chmod, chown, umask, and others.
Re: Advice Wanted : Best Linux user and group owner
Posted: Fri Jan 11, 2008 4:53 am
by nivekiam
Not just CMS packages, but any sort of package that can create, upload, etc files using code that runs as the webserver user.
That's why with CMSms, just as with Gallery and other software, I'll never use the software to upload modules, themes, etc. Files, photos, etc are easy enough to deal with as you usually only need to deal with them if you're changing hosts (or removing test installs). But that usually means having their permissions set to 777 or 666 when you move to the new host....
So for CMSms, I won't be using it to remove or add modules. Today I wanted to try out the Catalog module, so I used wget, unpacked the module and installed it via the admin interface.
I use SSH, wget and sometimes SFTP to get files onto the server my sites run on. That's also why I won't ever use a host that doesn't offer SSH access. I don't have root access to my server and I can't change file ownership, but I get along just fine and I've played around and used 4 or 5 major photo gallery packages and tested 6 or 7 (I think maybe 1 or 2 others I tossed to the side in 5 minutes) CMS packages in the last week. Right now I'm trying to choose between CMSms and MODx, but I keep coming back to CMSms.
And for others reading you'll find this line of code your friend:
Code: Select all
<?php exec('chmod -R 777 /path/to/files/you/need/to/remove/') ?>
o.k. So re-reading the parent post. You want the most trouble free setup? Run Apache and PHP in a chrooted or php-cgiwrap environment so it runs as the user and not as "nobody" or "apache" or some such user. Then any files you upload, install, create, etc are created by your user account and owned by you.
If you, like me, don't have that kind of control over your server or also don't believe that chrooted or php-cgiwrap is a good or perfect solution. Then you'll learn to use work arounds as I have.
(sorry rambling on is a bad habit I have)
Kevin
Re: Advice Wanted : Best Linux user and group owner
Posted: Fri Jan 11, 2008 10:24 pm
by drew
Right now I'm trying to choose between CMSms and MODx, but I keep coming back to CMSms.
Might be off topic here, but I also had installed/reviewed MODx. It seems to be a fine and simple product but seems to have growing pains because of transitions between major releases, module compatibility issues, and fragmented/outdated documentation.
From what I recall, MODx install was simple, just like CMSMS. However, it did not require root access to set perms...
I chose CMSMS because of its maturity and well documented features.
Re: Advice Wanted : Best Linux user and group owner
Posted: Sat Jan 12, 2008 3:07 pm
by Pierre M.
Hello, CMSms doesn't require root access. It works on most shared (L)AMP hostings.
Pierre M.
Re: Advice Wanted : Best Linux user and group owner
Posted: Sat Jan 12, 2008 4:40 pm
by nivekiam
I think he was referring to MODx. I didn't see it on their site, but in some old review, I think it was in some outdated info on one of the CMS matix/comparision sites that MODx requires root access. It's just like any other CMS I've tried. Anyone with FTP access and a database can set it up.