为 Rails 应用重新设置权限是否正确? [英] Is this correct to re-set up permissions for Rails app?
本文介绍了为 Rails 应用重新设置权限是否正确?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个名为rails"的新用户
然后将所有目录和文件的所有者和组设置为rails"
I made the new user called "rails"
Then owner and group of all the directories and files are set to "rails"
我确实在 /var/www/html/app
所以我应该执行 $ cd/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?
推荐答案
假设 /var/www/html/app
是位于以下位置的 Rails 应用程序的 app
文件夹/var/www/html
,你应该正在运行
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
找到.- 类型 d |xargs chmod 0755
找到.- 类型 f |xargs chmod 0644
您可能在字面上错误地解释了和".
You might be literally interpreting 'and' incorrectly.
这篇关于为 Rails 应用重新设置权限是否正确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文