阿里云的root依然没权限改到 /etc/profile ,chmod chattr 都不行
chmod u+x /etc/profilechattr -i /etc/profile 依然没有权限修改该文件。 怎么回事呢。 也没有挂载。

解决方案 »

  1.   

    修改提示这个
    -- INSERT -- W10: Warning: Changing a readonly file
    E325: ATTENTION
    Found a swap file by the name ".profile.swp"
              owned by: root   dated: Thu Jun 23 21:47:02 2016
             file name: /etc/profile
              modified: YES
             user name: root   host name: iZ23qeritb6Z
            process ID: 26477
    While opening file "profile"
                 dated: Fri Jun 24 09:37:13 2016
          NEWER than swap file!(1) Another program may be editing the same file.
        If this is the case, be careful not to end up with two
        different instances of the same file when making changes.
        Quit, or continue with caution.(2) An edit session for this file crashed.
        If this is the case, use ":recover" or "vim -r profile"
        to recover the changes (see ":help recovery").
        If you did this already, delete the swap file ".profile.swp"
        to avoid this message.
      

  2.   

    1、你用vi编辑器打开了/etc/profile没有正常关闭 
    2、chmod +w /etc/profile    w是写权限,x是执行权限