Error: A case analysis of/usr/include/stdio.h:permission denied
Code:
- #include <stdio. h>
- int main(){
- printf ("Hello long size%d\n", sizeof(long));
- }
It is easy to test whether it can be compiled by
Contrast
Try to solve the problem
under root user, look at the properties of stdio.h
Click ( here ") collapse or open
- ll/usr/include/stdio.h
- -rw-r--r--1 root root 31144 2010-05-06 10:33/us R/include/stdio.h
has a readable property, but with Vim open, the display is a [new file], why? The
has the readable permission just can't see the file!
Add executable permissions to the document, chmod +x/usr/include/stdio.h
Problem
Add executable permissions to link, # find/usr/include/-type l-exec ls -l {} \;
Problem
Remove the executable permission of link, # find/usr/include/-type l-exec chmod-x {} \;
Add executable permissions to the folder, # find/usr/include/-type d-exec chmod +x {} \;
Problem Resolution
Analysis
I don't understand what it is related to open/usr/include/stdio.h and other folder executable permissions, because/usr/include and/usr/include/stdio.h are both feasible and users should be able to read stdio.h files.
This situation occurs during the migration process, in order to prevent unnecessary trouble, add the following command, Chmod-r 755/usr/include/
Error: A case analysis of/usr/include/stdio.h:permission denied