Is this correct to re-set up permissions for Rails app?
Asked Answered
D

1

6

I made the new user called "rails"
Then owner and group of all the directories and files are set to "rails"

I do have the appliation in /var/www/html/app

So I should do $ cd /var/www/html/app and execute this?

find . -type d | xargs chmod 0755 and find . -type f | xargs chmod 0644

Is it going to set up permission for everything, and it'll be all fine?

Dichromate answered 15/2, 2013 at 10:6 Comment(0)
A
7

Assuming /var/www/html/app is the app folder for a rails application located at /var/www/html, you should be running

cd /var/www/html

find . -type d | xargs chmod 0755

find . -type f | xargs chmod 0644

You might be literally interpreting 'and' incorrectly.

Antonina answered 15/2, 2013 at 10:17 Comment(2)
Thanks. When I executed 0644, it returns this error chmod: cannot access copy': No such file or directory chmod: cannot access ./sample/app/assets/stylesheets/boostrap.css': No such file or directory chmod: cannot access copy.erb': No such file or directory chmod: cannot access ./sample/app/views/communities/_topic.html': No such file or directory chmod: cannot access `copy.erb': No such file or directoryDichromate
@Antonina I also having same type of errors by running sudo find . -type f | xargs chmod 0644 chmod: changing permissions of ./public/images/library/library_small.png': Operation not permitted , and by running directory permissions sudo find . -type d | xargs chmod 0755 i got chmod: changing permissions of ./public/stylesheets/library': Operation not permittedHost

© 2022 - 2024 — McMap. All rights reserved.