The root user's permission to modify files in the media folder is invalid.

Source: Internet
Author: User

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.

[email protected]:/#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?

[Email protected]:/Media/000b089d424696f/mine/C ++/poj/CCF # cp revnum. CPP 1.cpp[ email protected]:/Media/000b089d424696f/mine/C ++/poj/CCF # Vim 1.cpp[ email protected]: /Media/000b089d424696f/mine/C ++/poj/CCF # gcc-O 1 1.cpp[ email protected]: /Media/000b089d415696f/mine/C ++/poj/CCF #. /1 Bash :. /1: insufficient permissions [email protected]:/Media/000b089dda-696f/mine/C ++/poj/CCF # ls-l 1-rw ------- 1 Pipi P IPI 8463 Sep 29 1 [email protected]:/Media/000b089d415696f/mine/C ++/poj/CCF # chmod A + x 1 [email protected]: /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


The root user's permission to modify files in the media folder is invalid.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.