Skip to content

Commit

Permalink
Be specific with directory and file permissions when mapping /srv/www
Browse files Browse the repository at this point in the history
Rather than manually chmod specific directories to have group write access, map the /srv/www directory initially with 775 on directories and 664 on files. This allows for non sudo access to a bunch of stuff.

Reverts previous commits adding chmod statements.
  • Loading branch information
jeremyfelt committed Apr 27, 2013
1 parent c9c7bf3 commit 9b86905
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Vagrant.configure("2") do |config|
# If a www directory exists in the same directory as your Vagrantfile, a mapped directory
# inside the VM will be created that acts as the default location for nginx sites. Put all
# of your project files here that you want to access through the web server
config.vm.synced_folder "www/", "/srv/www/", :owner => "www-data"
config.vm.synced_folder "www/", "/srv/www/", :owner => "www-data", :extra => 'dmode=775,fmode=664'

# Customfile - POSSIBLY UNSTABLE
#
Expand Down
5 changes: 0 additions & 5 deletions provision/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ then
mv wordpress wordpress-default
rm latest.tar.gz
cd /srv/www/wordpress-default
chmod -R g+w /srv/www/wordpress-default
printf "Configuring WordPress...\n"
wp core config --dbname=wordpress_default --dbuser=wp --dbpass=wp --quiet
wp core install --url=local.wordpress.dev --quiet --title="Local WordPress Dev" --admin_name=admin --admin_email="[email protected]" --admin_password="password"
Expand All @@ -240,14 +239,12 @@ then
printf "Checking out WordPress trunk....http://core.svn.wordpress.org/trunk\n"
svn checkout http://core.svn.wordpress.org/trunk/ /srv/www/wordpress-trunk
cd /srv/www/wordpress-trunk
chmod -R g+w /srv/www/wordpress-trunk
printf "Configuring WordPress trunk...\n"
wp core config --dbname=wordpress_trunk --dbuser=wp --dbpass=wp --quiet
wp core install --url=local.wordpress-trunk.dev --quiet --title="Local WordPress Trunk Dev" --admin_name=admin --admin_email="[email protected]" --admin_password="password"
else
printf "Updating WordPress trunk...\n"
cd /srv/www/wordpress-trunk
chmod -R g+w /srv/www/wordpress-trunk
svn up --ignore-externals
fi
fi
Expand All @@ -261,12 +258,10 @@ then
# Must be in a WP directory to run wp
cd /srv/www/wordpress-trunk
wp core init-tests /srv/www/wordpress-unit-tests --dbname=wordpress_unit_tests --dbuser=wp --dbpass=wp
chmod -R g+w /srv/www/wordpress-unit-tests
else
printf "Updating WordPress unit tests...\n"
cd /srv/www/wordpress-unit-tests
svn up --ignore-externals
chmod -R g+w /srv/www/wordpress-unit-tests
fi
fi

Expand Down

0 comments on commit 9b86905

Please sign in to comment.