FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 09-02-2010, 05:23 AM
James Corteciano
 
Default Ownership doesnt work on webdir

Hi,

I have this webroot /webdir/ with 2775 permission so that any created
file/directory by apache inside of /webdir/ will be 'users:webusers'.
However, I noticed when the apache created a new files (fileB) / directories
(dirB), the ownership becomes 'apache:apache' and the sgid has gone for
/webdir/ (drwxrwxr-x). I'm currently using Wordpress.

[before]
drwxrwsr-x users webusers /webdir/
drwxrwsr-x users webusers /webdir/dirA
-rw-rw-r-- users webusers /webdir/fileA

[after]
drwxrwxr-x users webusers /webdir/
drwxrwxr-x apache apache /webdir/dirB
-rw-rw-r-- apache apache /webdir/fileB

Why the sgid bit doesn't reflected and the group as well? Has anyone knows
how to fix this?

Thanks.

Regards,
James
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 09-03-2010, 01:37 PM
Vimal
 
Default Ownership doesnt work on webdir

On 09/02/2010 10:53 AM, James Corteciano wrote:

I noticed when the apache created a new files (fileB) / directories
(dirB), the ownership becomes 'apache:apache' and the sgid has gone for
/webdir/ (drwxrwxr-x). I'm currently using Wordpress.



I am almost certain this has something to do with Wordpress itself...
You might want to investigate its code:


========
[vimal@server public_html]$ grep chgrp * -r
wp-admin/includes/class-wp-filesystem-ftpsockets.php: function
chgrp($file, $group, $recursive = false ) {
wp-admin/includes/class-wp-filesystem-ftpsockets.php: function
mkdir($path, $chmod = false, $chown = false, $chgrp = false ) {

wp-admin/includes/class-wp-filesystem-ftpsockets.php: if ( $chgrp )
wp-admin/includes/class-wp-filesystem-ftpsockets.php:
$this->chgrp($path, $chgrp);
wp-admin/includes/class-wp-filesystem-ssh2.php: function chgrp($file,
$group, $recursive = false ) {
wp-admin/includes/class-wp-filesystem-ssh2.php: return
$this->run_command(sprintf('chgrp %o %s', $mode, escapeshellarg($file)),
true);
wp-admin/includes/class-wp-filesystem-ssh2.php: return
$this->run_command(sprintf('chgrp -R %o %s', $mode,
escapeshellarg($file)), true);
wp-admin/includes/class-wp-filesystem-ssh2.php: function mkdir($path,
$chmod = false, $chown = false, $chgrp = false) {

wp-admin/includes/class-wp-filesystem-ssh2.php: if ( $chgrp )
wp-admin/includes/class-wp-filesystem-ssh2.php:
$this->chgrp($path, $chgrp);
wp-admin/includes/class-wp-filesystem-ftpext.php: function
chgrp($file, $group, $recursive = false ) {
wp-admin/includes/class-wp-filesystem-ftpext.php: function
mkdir($path, $chmod = false, $chown = false, $chgrp = false) {

wp-admin/includes/class-wp-filesystem-ftpext.php: if ( $chgrp )
wp-admin/includes/class-wp-filesystem-ftpext.php:
$this->chgrp($path, $chgrp);
wp-admin/includes/class-wp-filesystem-direct.php: function
chgrp($file, $group, $recursive = false) {
wp-admin/includes/class-wp-filesystem-direct.php: return
@chgrp($file, $group);
wp-admin/includes/class-wp-filesystem-direct.php: return
@chgrp($file, $group);
wp-admin/includes/class-wp-filesystem-direct.php:
$this->chgrp($file . $filename, $group, $recursive);
wp-admin/includes/class-wp-filesystem-direct.php: function
mkdir($path, $chmod = false, $chown = false, $chgrp = false) {

wp-admin/includes/class-wp-filesystem-direct.php: if ( $chgrp )
wp-admin/includes/class-wp-filesystem-direct.php:
$this->chgrp($path, $chgrp);

========

--
Regards,
Vimal Kumar K

| vimalZworld.com * technomenace.com * twitter.com/vimal7370 |
| E: vimal7370 at gmail dot com P: +919947450760 |


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 

Thread Tools




All times are GMT. The time now is 02:53 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org