The root user's permission to modify files in the media folder is invalid.
Http://blog.csdn.net/pipisorry/article/details/39649699
Problem:
I want to execute a program written by myself in the media folder, but cannot execute
The owner of the media folder is root.
root@ubuntu:/#ls -ld /mediadrwxr-xr-x 5 root root 1024 Sep 29 00:08 /media
So I enter commands on the terminal as root.
Chmod a + x 1, No response after the carriage return, and the query of the folder's properties has not changed. Why?
Root @ ubuntu:/media/000b089d424696f/mine/C ++/POJ/CCF # cp RevNum. cpp 1. cpproot @ ubuntu:/media/000b089d424696f/mine/C ++/POJ/CCF # vim 1. cpproot @ ubuntu:/media/000b089d424696f/mine/C ++/POJ/CCF # gcc-o 1. cpproot @ ubuntu:/media/000b089d424696f/mine/C ++/POJ/CCF #. /1 bash :. /1: insufficient permissions. root @ ubuntu: /media/000B089D0000696F/mine/C ++/POJ/CCF # ls-l 1-rw ------- 1 pipi 8463 Sep 29 1root @ ub Untu:/media/000b089d424696f/mine/C ++/POJ/CCF # chmod a + x 1root @ ubuntu: /media/000b089d424696f/mine/C ++/POJ/CCF # ls-l 1-rw ------- 1 pipi 8463 Sep 29 1 => the permission has not changed, still unable to execute !!!
Solution:
1. log on to the GUI as root
For logon methods, see [add, delete, and modify users in linux]
2. Use mount to solve the problem
Sudo umount/media/administrator/movie
Sudo mount-o rw/dev/sda7/media
When media is mounted, sudo umount/media is used for removal.
Ps:
The reason why many files in the media folder are read-only:
The reason for read-only is that the quick Restart Technology of win8 after enabling the other system to write the partition will lead to data loss, so ntfs-3g (ntfs support module on linux) by default prohibit ntfs write operations
In addition, do not modify permissions for folders under /.
Simple mount usage:
Root permission required
Mount partition mount point
Partition: similar to/dev/sda1
Mount point: destination folder, preferably empty
Example:Mount the first partition (sda1) to/home/xxx/
Mount/dev/sda1/home/xxx/
Unmount only umount mount points
(Add sudo with the above command)
In addition, the/file should not be modified
Media (null) Permission
Sudo chmod 755/media
From: http://blog.csdn.net/pipisorry/article/details/39649699
Ref: Command for modifying folder Permissions