Help us understand the problem. What is going on with this article?

【AWS EC2】$sudo vim /etc/nginx/conf.d/rails.conf 書き込みできない

vimでrails.confの修正→保存

[ec2-user@ip-XXX-XX-XX-XXX ~]$ sudo vim Z/etc/nginx/conf.d/rails.conf

上記のコマンドでvimにてrails.confに加筆し、いざ保存!というときに保存できない!
となった場合は下記のコマンドを入力して、権限を与えてください。

使用するコマンド

[ec2-user@ip-XXX-XX-XX-XXX ~]$ sudo chown ec2-user /var/www/

再度下記のコマンドでrails.confにアクセスし加筆保存すれば、編集できるはず!

[ec2-user@ip-XXX-XX-XX-XXX ~]$ sudo vim Z/etc/nginx/conf.d/rails.conf
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away