LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-08-2015, 06:12 AM   #1
artexanis
LQ Newbie
 
Registered: Sep 2015
Posts: 2

Rep: Reputation: Disabled
permission problems with www-data user


Hi there,

I'm using owncloud for a while and I'm very happy, it does what I expect it to do.
Now I'm presented with a problem, the storage is full. I bought a new HD, added it in the computer and did a search on how to move owncloud to the new disk. I followed this guide: https://forum.owncloud.org/viewtopic.php?t=7118

After doing exactly that, owncloud can't connect to my data dir and owncloud is complaining:
Quote:
Cannot create "data" directory (/media/neoscores/files/owncloud/ocdata)
This can usually be fixed by giving the webserver write access to the root directory.
I'm on an Ubuntu 14.04, ownCloud 8.1.1, PHP version 5.5.9-1.

The owner of /media/neoscores/files/owncloud is 'www-data:www-data' (recursive) and is not the mount point ('files' is the mount point). Permissions of /media/neoscores/files/owncloud are 770 (recursive).

Output of
Code:
echo
"User: " . exec('whoami');
echo "Group: " . exec('groups');
is 'www-data'.

I'm stuck, no clue on what's going on. It has something to do with my linux, because I can't:
Code:
sudo -u www-data mkdir /media/neoscores/files/owncloud/testDir
But I can cd my way to '/media/neoscores/files/' and
Code:
sudo -u www-data mkdir owncloud/testDir
without problems...

Ow yes, SELinux is disabled.
In PHP open_basedir isn't set, so Apache should be able to reach that directory.

Is there anybody who can point out what's going wrong?

Thanks!
 
Old 09-08-2015, 09:27 AM   #2
artexanis
LQ Newbie
 
Registered: Sep 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
got it working: somebody pointed out:

Quote:
Please check, that the user www-data has at least execute permission on all directories traversed when changing into /media/neoscores/files.

I guess that /media/neoscores has no execute permission set for others, so that www-data can't change into the directory.
However if you already are in the directory on the shell and execute something as www-data, it can traverse it anyhow.
--patlkli
The neoscores folder had no execute rights for www-data
 
Old 09-08-2015, 10:08 AM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Good job and well done!
Great post too, you gave good, usable info up front.
You rock!

Welcome to LQ!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba-Apache-Webdav permission problem with user www-data dilettante9 Linux - Newbie 2 06-07-2015 07:05 PM
Apache can't access directory with permission www-data AlexRsk Linux - Newbie 1 10-30-2014 07:18 AM
[SOLVED] chown: invalid user 'www-data:www-data' thund3rstruck Linux - Server 4 03-21-2013 01:53 AM
Give www-data permission to sudo dangibas Programming 5 08-30-2010 01:35 PM
Giving user 'www-data' same permissions as normal user MikeOfAustin Linux - Software 5 06-08-2007 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration