Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

First I'm a NEWBIE - I'm using a Bitnami stack to deploy a Rails app.

Bitnami has the rails applications in /opt/bitnami/projects.

I created a group called deployers. My login is bitnami. So, I added bitnami to deployers (I'm the only developer right now).

So,

  • whoami = bitnami
  • groups bitnami = bitnami : bitnami adm dialout cdrom floppy audio dip video plugdev admin deployers

Then I ran these commands:

sudo chown -R root:deployers projects
sudo chmod -R 0766 projects

I thought those commands would give bitnami in group deployers the read/write access I need.

But, now I can't even cd projects. I get bash: cd: projects: Permission denied.

The permissions on the projects directory look like this:

projects Directory drwxrw-rw- root deployers

How do I fix it?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You can't cd projects because you must have execute permission on a directoryto do so. Run this to set the permissions:

sudo find projects -type f -exec chmod -R 664 {} \;
sudo find projects -type d -exec chmod -R 775 {} \;

The first applies read and write permissions to files and the second applies read, write and execute permission to directories.

share|improve this answer
    
Thanks - I appreciate the help! –  Reddirt Mar 2 '13 at 18:05

The execution permission for directory means that you can cd into it. So if you want to cd into directory projects on groups behalf you have to set the execute bit on that directory:

chmod g+x projects
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.