LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-23-2014, 07:04 AM   #1
jambuntu
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
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
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
Code:
newgrp www-data
http://linux.die.net/man/1/newgrp
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
Smokey_justme
Member
 
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
jambuntu
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...
 
  


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
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


All times are GMT -5. The time now is 05:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration