Find all files on server with 777 permissions
I'm looking for a Linux command to go through all the directories on my server and find all files with 777 permission. The output would be a list of all those files with full path.
linux command-line permissions find chmod
migrated from stackoverflow.com Nov 16 '09 at 3:19
This question came from our site for professional and enthusiast programmers.
add a comment |
I'm looking for a Linux command to go through all the directories on my server and find all files with 777 permission. The output would be a list of all those files with full path.
linux command-line permissions find chmod
migrated from stackoverflow.com Nov 16 '09 at 3:19
This question came from our site for professional and enthusiast programmers.
add a comment |
I'm looking for a Linux command to go through all the directories on my server and find all files with 777 permission. The output would be a list of all those files with full path.
linux command-line permissions find chmod
I'm looking for a Linux command to go through all the directories on my server and find all files with 777 permission. The output would be a list of all those files with full path.
linux command-line permissions find chmod
linux command-line permissions find chmod
edited Feb 13 '10 at 7:19
quack quixote
35.3k1087119
35.3k1087119
asked Nov 15 '09 at 22:53
bartclaeys
migrated from stackoverflow.com Nov 16 '09 at 3:19
This question came from our site for professional and enthusiast programmers.
migrated from stackoverflow.com Nov 16 '09 at 3:19
This question came from our site for professional and enthusiast programmers.
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
Use find:
find / -type f -perm 0777
add a comment |
And if you like to find all files without Permission 0777 then just enter a ! before the perm, e.g.
find / -type f ! -perm 0777
add a comment |
You can also change the permissions or ownership of all those files resulting from the find execution using the -exec option to avoid change them manually.
Exempli gratia: In a web server you could need to grant the group to write files:
find / -type f -perm 0777 -exec chmod 775 {} ; -exec chgrp -R www {} ;
1
Be very very careful doing this - always worth using -exec ls first in order to see what the effect of your command will do. Find is super powerful and will often find things you didn't expect it to.
– John Hunt
Mar 24 '17 at 11:24
It's true. My command should be used once you know which files will result from the search.
– altmas5
Apr 5 '17 at 17:25
add a comment |
it's as easy as:
find / -perm 0777
if you only want to match files, use this instead:
find / -type f -perm 0777
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f71041%2ffind-all-files-on-server-with-777-permissions%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Use find:
find / -type f -perm 0777
add a comment |
Use find:
find / -type f -perm 0777
add a comment |
Use find:
find / -type f -perm 0777
Use find:
find / -type f -perm 0777
edited Jan 28 at 13:24
Twisty Impersonator
18.4k146699
18.4k146699
answered Nov 15 '09 at 22:57
jheddingsjheddings
72155
72155
add a comment |
add a comment |
And if you like to find all files without Permission 0777 then just enter a ! before the perm, e.g.
find / -type f ! -perm 0777
add a comment |
And if you like to find all files without Permission 0777 then just enter a ! before the perm, e.g.
find / -type f ! -perm 0777
add a comment |
And if you like to find all files without Permission 0777 then just enter a ! before the perm, e.g.
find / -type f ! -perm 0777
And if you like to find all files without Permission 0777 then just enter a ! before the perm, e.g.
find / -type f ! -perm 0777
answered Dec 16 '11 at 9:53
KaiKai
16112
16112
add a comment |
add a comment |
You can also change the permissions or ownership of all those files resulting from the find execution using the -exec option to avoid change them manually.
Exempli gratia: In a web server you could need to grant the group to write files:
find / -type f -perm 0777 -exec chmod 775 {} ; -exec chgrp -R www {} ;
1
Be very very careful doing this - always worth using -exec ls first in order to see what the effect of your command will do. Find is super powerful and will often find things you didn't expect it to.
– John Hunt
Mar 24 '17 at 11:24
It's true. My command should be used once you know which files will result from the search.
– altmas5
Apr 5 '17 at 17:25
add a comment |
You can also change the permissions or ownership of all those files resulting from the find execution using the -exec option to avoid change them manually.
Exempli gratia: In a web server you could need to grant the group to write files:
find / -type f -perm 0777 -exec chmod 775 {} ; -exec chgrp -R www {} ;
1
Be very very careful doing this - always worth using -exec ls first in order to see what the effect of your command will do. Find is super powerful and will often find things you didn't expect it to.
– John Hunt
Mar 24 '17 at 11:24
It's true. My command should be used once you know which files will result from the search.
– altmas5
Apr 5 '17 at 17:25
add a comment |
You can also change the permissions or ownership of all those files resulting from the find execution using the -exec option to avoid change them manually.
Exempli gratia: In a web server you could need to grant the group to write files:
find / -type f -perm 0777 -exec chmod 775 {} ; -exec chgrp -R www {} ;
You can also change the permissions or ownership of all those files resulting from the find execution using the -exec option to avoid change them manually.
Exempli gratia: In a web server you could need to grant the group to write files:
find / -type f -perm 0777 -exec chmod 775 {} ; -exec chgrp -R www {} ;
edited May 20 '12 at 21:32
answered May 19 '12 at 17:01
altmas5altmas5
19026
19026
1
Be very very careful doing this - always worth using -exec ls first in order to see what the effect of your command will do. Find is super powerful and will often find things you didn't expect it to.
– John Hunt
Mar 24 '17 at 11:24
It's true. My command should be used once you know which files will result from the search.
– altmas5
Apr 5 '17 at 17:25
add a comment |
1
Be very very careful doing this - always worth using -exec ls first in order to see what the effect of your command will do. Find is super powerful and will often find things you didn't expect it to.
– John Hunt
Mar 24 '17 at 11:24
It's true. My command should be used once you know which files will result from the search.
– altmas5
Apr 5 '17 at 17:25
1
1
Be very very careful doing this - always worth using -exec ls first in order to see what the effect of your command will do. Find is super powerful and will often find things you didn't expect it to.
– John Hunt
Mar 24 '17 at 11:24
Be very very careful doing this - always worth using -exec ls first in order to see what the effect of your command will do. Find is super powerful and will often find things you didn't expect it to.
– John Hunt
Mar 24 '17 at 11:24
It's true. My command should be used once you know which files will result from the search.
– altmas5
Apr 5 '17 at 17:25
It's true. My command should be used once you know which files will result from the search.
– altmas5
Apr 5 '17 at 17:25
add a comment |
it's as easy as:
find / -perm 0777
if you only want to match files, use this instead:
find / -type f -perm 0777
add a comment |
it's as easy as:
find / -perm 0777
if you only want to match files, use this instead:
find / -type f -perm 0777
add a comment |
it's as easy as:
find / -perm 0777
if you only want to match files, use this instead:
find / -type f -perm 0777
it's as easy as:
find / -perm 0777
if you only want to match files, use this instead:
find / -type f -perm 0777
answered Nov 15 '09 at 22:56
knittlknittl
2,97811216
2,97811216
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f71041%2ffind-all-files-on-server-with-777-permissions%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown