这看起来很基础也很容易,但是天啊...我头疼啊。
我关注了这个问题:如何将 php 文件保存在 /opt/lampp/htdocs 中,而无需进入终端并输入 sudo gedit?
我希望能够复制粘贴到 /opt/lampp/htdocs。这是我在终端上所做的:
- 查看当前用户和组:用户 -> 结果:tama tama
sudo chown tama:tama /opt/lampp/htdocs
sudo chmod 700 /opt/lampp/htdocs
文件的所有者已成功更改,但我仍然无法粘贴。(灰色)
的结果stat /opt/lampp/htdocs
:
File: ‘/opt/lampp/htdocs’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 805h/2053d Inode: 5505136 Links: 11
Access: (0700/drwx------) Uid: ( 1000/ tama) Gid: ( 1000/ tama)
Access: 2014-11-07 13:51:31.488418404 +0700
Modify: 2014-01-27 17:37:56.969253666 +0700
Change: 2014-11-07 13:50:37.232417525 +0700
Birth: -
的结果ls -l /opt/lampp/htdocs
:
drwxrwxr-x 3 tama tama 4096 Nov 13 2013 alif
-rwxrwxr-x 1 root root 1444 Jun 10 2013 applications.html
-rwxrwxr-x 1 root root 2142 Apr 29 2013 bitnami.css
drwxrwxr-x 6 tama tama 4096 Jan 27 2014 bluezsteak
drwxrwxr-x 4 tama tama 4096 Nov 11 2013 budi
-rwxrwxr-x 1 root root 30894 Mei 11 2007 favicon.ico
drwxrwxr-x 8 tama tama 4096 Okt 1 2013 gabdb
drwxrwxr-x 2 root root 4096 Okt 9 2013 img
-rwxrwxr-x 1 root root 256 Peb 6 2009 index.php
drwxrwxr-x 4 tama tama 4096 Nov 14 2013 jewelry
drwxrwxr-x 8 tama tama 4096 Okt 13 2013 kmbd
drwxrwxr-x 2 daemon daemon 4096 Okt 9 2013 webalizer
drwxrwxr-x 7 root root 4096 Okt 9 2013 xampp
请帮助我。谢谢你的帮助。
答案1
递归尝试chown
sudo chown -R tama:tama /opt/lampp/htdocs