You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by LuKreme <kr...@kreme.com> on 2009/11/24 02:10:34 UTC

[users@httpd] webdav and permissions

I posted this on the OS X Talk list first, but haven't gotten a solution yet.

I have a remote server (FreeBSD, apache 2.2.11_7) with a wordpress (current) install.  The permissions on the main root folder for the install are:

$ ls -lsa
total 92
2 drwxr-xr-x   7 www   wheel    512 Nov 22 13:20 .
2 drwxr-xr-x  35 root  wheel   1024 Nov 19 06:53 ..
2 drwxr-xr-x   2 www   wheel    512 Nov 11 17:09 html
2 drwxr-xr-x   5 www   www     1024 Nov 14 13:13 wordpress

inside the wordpress folder there is a theme folder with the following permissions:

$ ls -lsd wordpress/wp-content/themes/autumn-forest/imgs/
2 drwxr-xr-x  2 www  www  512 Nov 22 05:59 wordpress/wp-content/themes/autumn-forest/imgs/

All the folders under the 'root' for the domain have the same permissions.

When I mount the root of the user on OS X via webDAV, I am able to copy files into the root folder or the html folder, but not into the wordpress folder, or into the imgs folder where they are supposed to go. (this is evidently how you add/change sidebar images in WP themes).

The only .htaccess is the one created by wordpress in the wordpress folder.

<<EOF
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^u/([0-9]+)$ wp-content/plugins/short-url-plugin/u.php?$1|$2
</IfModule>

# END WordPress
# BEGIN WordPress

# END WordPress
# BEGIN WordPress

# END WordPress
EOF

When I try to copy a file into the wordpress folder, I get an OS X auth dialog asking for an admin user/password. If I type in my local machine's admin info, I then get "One or more items can't be copied to 'wordpress' because you don't have permission to read them. Do you want to copy the items you are allowed to read?" If I try to copy from the command line I get:

$ cp ~/Desktop/sidephoto.jpg wordpress/wp-content/themes/autumn-forest/imgs/
cp: wordpress/wp-content/themes/autumn-forest/imgs/sidephoto.jpg: Operation not permitted

(which is not a Permission denied error, which is one gets when there's a permission issue)

in httpd/user/example.conf I have

<virtualhost *>
 ServerName webdav.example.com
 DocumentRoot /usr/local/www/example.com/
 DavLockDB /tmp/DavLock.example
 <location />
    DAV On
    AuthType Basic
    AuthName example
    AuthUserFile /usr/local/www/example.com/.htdavpass
    Options All
    ForceType text/plain
    <Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
       require valid-user 
    </limit>
 </location>
</VirtualHost>

<Directory "/usr/local/www/example/wordpress/">
  #AllowOverride All
  Options -ExecCGI +Includes
  Order allow,deny
  Allow from all
</Directory>

If I remove/rename the .htaccess file, then I can copy via webDAV as much as I want.

-- 
Wally: That's my nickname, "Waly" with one el. 
Dilbert: Who calls you that?
Wally: Most people, they just don't realize it.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: webdav and permissions [Solved]

Posted by LuKreme <kr...@kreme.com>.
On 23-Nov-2009, at 18:10, LuKreme wrote:
> <<EOF
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /index.php [L]
> RewriteRule ^u/([0-9]+)$ wp-content/plugins/short-url-plugin/u.php?$1|$2
> </IfModule>


I modified the htaccess file hoping I could eliminate the webdav issue. My webdav mount is webdav.example.com, so I did this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} !^webdav
RewriteRule . /index.php [L]
RewriteRule ^u/([0-9]+)$ wp-content/plugins/short-url-plugin/u.php?$1|$2
</IfModule>

That has fixed the problem and it is now possible to access the entire web space via wedbav.

-- 
I WILL NOT BRIBE PRINCIPAL SKINNER
	Bart chalkboard Ep. 8F03


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org