Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-23-2014, 07:04 AM   #1
LQ Newbie
Registered: Apr 2014
Posts: 2

Rep: Reputation: Disabled
Having a hard time with permissions...

Hi there

I'm pretty new to Linux sysadmin and despite reading lots on file permissions I'm still banging my head against the wall on this one.

I have an Ubuntu VPS which hosts my Drupal website. On this server I have created a new user called deploy. This is the user used by a the code deployment platform that I'm using, DeployHQ, when it connects to the server via SSH. The service connects to the server, uploads files and then should execute the make command provided by the Drupal CLI tool Drush. This command, bascially, retrieves code from repositories and builds the project but all the retrieved files are written to the /tmp directory before being moved into place.

I gave the deploy user a secondary group of www-data and changed all the files within the project to be owned by ubuntu (admin account) and in the www-data group with permissions of 775. I did this because Apache will also need to be able to write to some directories (file uploads).

Having deploy in the www-data group I expected that there would be no issues moving the build from /tmp to the project directory as the command is executed by the deploy user and it should have permissions to change the files in the project directory by definition of it's group but the build does not move. Next I tried changing the primary group of deploy to www-data but still the build doesn't move into place. Unfortunately the only way I can get the Drush make command to execute entirely is to change all files within the project directory to be owned by deploy and in the deploy group which doesn't seem right plus causes problems for Apache.

Where am I going wrong?! The permissions system doesn't seem that complicated but I'm clearly not doing something right.

Any help greatly appreciated...
Old 04-23-2014, 07:51 AM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,418

Rep: Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398
Can you show the exact cmd you used and the msg you got, maybe along with a long listing of a few files.

What might help is that if you gave user 'deploy' a secondary group of www-data, try using
newgrp www-data
at the start of the build; effectively makes www-data the primary group (for user deploy) for rest of the session.
Old 04-23-2014, 07:58 AM   #3
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
There should not be any issues from what you've done... The move should go smoothly.. I'm also interested in the exact error, maybe it will tell us something..
Old 04-23-2014, 08:17 AM   #4
LQ Newbie
Registered: Apr 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
I'll try running the make with verbose output and get back to you...


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
Having a hard time making linux recognizing my new external hard drive jared nelson Linux - Hardware 19 03-24-2009 04:39 PM
Hard Drive Permissions yusuo Mandriva 5 05-16-2007 08:34 AM
Need help with hard disk permissions Ekuliak Linux - Newbie 6 02-10-2006 04:55 PM
Hard drive permissions R¬dical_úD SUSE / openSUSE 3 01-10-2005 08:20 AM
Permissions for second hard drive digi691 Linux - Newbie 29 09-03-2004 11:33 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:05 PM.

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