Subject:*
Name/Email:*
Message Icon:*
Message:*
url email imgsrc image php hide code quote
English Nederlands 
SAMPLE
alignleft aligncenter alignright bold italic underline linethrough   


 [more...]
Options:*
 

 

 
     
Re: Php handlers like suphp as related to .tar.gz file ownership (chown) and permissions (chmod)

by thomas on 2008/2/10 0:27:40

Installing impresscms on a server with the suphp handler enabled.
_______________________________________

Using Putty or WinScp Custom Commands (chmod)
Logged in under root or accountname
-----
Warning:

cd to/correct/dir/first

#1

chmod -R 755 *

Changes all files and folders to 755 First
All I do is right click public_html and run from winscp

You can paste in winscp custom command and check the remote command box. Save it

#2

find -type f -print0|xargs -0 chmod 644

Searches for all non-folders and chmod them 644
All I do is right click public_html and run from winscp

You can paste in winscp custom command and check the remote command box. Save it
______________________________________


Using Putty Only from Root (chown)
-----

chown account.account -R /home/account/public_html/

chown account.nobody /home/account/public_html/

______________________________________

Last step go back and make sure your public_html folder is still set at default.

chmod 750

______________________________________

Server security is the name of the game.

I will be posting a little later about setting up your trust_path in impresscms. These are pretty tight settings. So it should be interesting.
Re: Php handlers like suphp as related to .tar.gz file ownership (chown) and permissions (chmod)

by thomas on 2008/2/9 22:58:15

I have tested and tested this every way I can think of. Root and account owner makes no difference. impresscms.tar.gz all files and folders are 775 uncompressed. Xoops.tar.gz all file and folders are 777 uncompressed.

What is used to make these releases?
Re: Php handlers like suphp as related to .tar.gz file ownership (chown) and permissions (chmod)

by thomas on 2008/2/9 14:12:51

Quote:


Dave_L wrote:
Files in a .tar.gz always have permissions. When extracting the contents of a .tar.gz, I think it works like this:

If the current user is root, the permissions are preserved. If the current user is not root, the permissions are overridden by the umask setting. tar has options for modifying this behavior.

Of course, this only applies to Linux.



Im am going to go back and check this tonight to confirm what you said. I cannot remember if I checked both ways on upload and when uncompressing the archive. Meaning as root and as account holder.

If this rings true then the only thing needed would be to update docs. For us newbies... Should be something to the effect never use root to upload or uncompress the archive.

Which looking back now might be something every server admin knows anyway. But doesn't cover us back yarders we learn by mistakes...

Thanks for the post and the idea...

Can this topic be moved to the server security forum? I think it might be better in that section. Which I did not see when starting this topic.
Re: Php handlers like suphp as related to .tar.gz file ownership (chown) and permissions (chmod)

by Will on 2008/2/9 13:52:28

I know its not directed at me specifically. Clearly you misread my post. WinScp DOES have an export command. However it does not export your command list alone.

That pertains to the community as well. You cannot export yours either, without all of your personal info piggybacking.

This sounds more like something you should be posting on the winscp forums... as feature request.

Otherwise, yes you will have to do it the same way everyone else has done it since the birth of telnet. Granted the commands have changed, and simplified.

The snippets I posted are as simple as it gets.

(if you are concerned about storing this somewhere where it will be easily accessible. Execute it once in putty, then whenever you need it again... just press the up key until you get to it, as by default putty stores all the commands you pass through it.)
Re: Php handlers like suphp as related to .tar.gz file ownership (chown) and permissions (chmod)

by Dave_L on 2008/2/9 13:35:59

Files in a .tar.gz always have permissions. When extracting the contents of a .tar.gz, I think it works like this:

If the current user is root, the permissions are preserved. If the current user is not root, the permissions are overridden by the umask setting. tar has options for modifying this behavior.

Of course, this only applies to Linux.