Accidentally deleted tmp folder
up vote
14
down vote
favorite
i was trying to run
sudo rm -r ./tmp
but instead typed
sudo rm -r /tmp
Will it be fixed by running?
sudo mkdir /tmp
if i do what permissions should i give it?
ps: i didnt log out of my system yet
tmp
add a comment |
up vote
14
down vote
favorite
i was trying to run
sudo rm -r ./tmp
but instead typed
sudo rm -r /tmp
Will it be fixed by running?
sudo mkdir /tmp
if i do what permissions should i give it?
ps: i didnt log out of my system yet
tmp
add a comment |
up vote
14
down vote
favorite
up vote
14
down vote
favorite
i was trying to run
sudo rm -r ./tmp
but instead typed
sudo rm -r /tmp
Will it be fixed by running?
sudo mkdir /tmp
if i do what permissions should i give it?
ps: i didnt log out of my system yet
tmp
i was trying to run
sudo rm -r ./tmp
but instead typed
sudo rm -r /tmp
Will it be fixed by running?
sudo mkdir /tmp
if i do what permissions should i give it?
ps: i didnt log out of my system yet
tmp
tmp
asked Aug 21 '12 at 22:09
Adonis K. Kakoulidis
86321027
86321027
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
up vote
24
down vote
accepted
I can't think of a reason why this shouldn't work. On my system, the permissions are set by:
sudo chmod 1777 /tmp
(drwxrwxrwxt)
I rebooted my system after deleting the/tmp
folder and now it is not getting pastlightdm
.
– Juzer Ali
Dec 5 '12 at 4:49
add a comment |
up vote
8
down vote
You should run the following commands to restore the tmp folder.
sudo -i
# You now have a root prompt and do not need to continue typing sudo
mkdir /tmp
chmod 1777 /tmp
exit
Then you sould be all good
1
I think that exiting the root prompt after the steps would be worth mentioning.
– zxcdw
Aug 22 '12 at 0:34
add a comment |
up vote
4
down vote
To add to Alex's answer, you can do both those commands at the same time using the -m
or --mode
option for mkdir(1), which specifies the mode for the created directory:
-m, --mode=MODE set file mode (as in chmod), not a=rwx - umask
So the command would be:
sudo mkdir -m 1777 /tmp
add a comment |
up vote
-1
down vote
A reboot of the system will fix it up automatically, in case if you have issues with rebooting the system use sudo mkdir -m 1777 /tmp
should work fine as mentioned in other answers.
1
Duplicate of accepted answer.
– Fabby
Dec 4 at 7:23
Not really - this one uniquely suggests that rebooting will fix
– Zanna
Dec 4 at 10:54
1
And how will the user issue that command if they have trouble rebooting?
– Elder Geek
Dec 7 at 17:20
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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',
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%2faskubuntu.com%2fquestions%2f178751%2faccidentally-deleted-tmp-folder%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
up vote
24
down vote
accepted
I can't think of a reason why this shouldn't work. On my system, the permissions are set by:
sudo chmod 1777 /tmp
(drwxrwxrwxt)
I rebooted my system after deleting the/tmp
folder and now it is not getting pastlightdm
.
– Juzer Ali
Dec 5 '12 at 4:49
add a comment |
up vote
24
down vote
accepted
I can't think of a reason why this shouldn't work. On my system, the permissions are set by:
sudo chmod 1777 /tmp
(drwxrwxrwxt)
I rebooted my system after deleting the/tmp
folder and now it is not getting pastlightdm
.
– Juzer Ali
Dec 5 '12 at 4:49
add a comment |
up vote
24
down vote
accepted
up vote
24
down vote
accepted
I can't think of a reason why this shouldn't work. On my system, the permissions are set by:
sudo chmod 1777 /tmp
(drwxrwxrwxt)
I can't think of a reason why this shouldn't work. On my system, the permissions are set by:
sudo chmod 1777 /tmp
(drwxrwxrwxt)
answered Aug 21 '12 at 22:18
StarNamer
2,4361324
2,4361324
I rebooted my system after deleting the/tmp
folder and now it is not getting pastlightdm
.
– Juzer Ali
Dec 5 '12 at 4:49
add a comment |
I rebooted my system after deleting the/tmp
folder and now it is not getting pastlightdm
.
– Juzer Ali
Dec 5 '12 at 4:49
I rebooted my system after deleting the
/tmp
folder and now it is not getting past lightdm
.– Juzer Ali
Dec 5 '12 at 4:49
I rebooted my system after deleting the
/tmp
folder and now it is not getting past lightdm
.– Juzer Ali
Dec 5 '12 at 4:49
add a comment |
up vote
8
down vote
You should run the following commands to restore the tmp folder.
sudo -i
# You now have a root prompt and do not need to continue typing sudo
mkdir /tmp
chmod 1777 /tmp
exit
Then you sould be all good
1
I think that exiting the root prompt after the steps would be worth mentioning.
– zxcdw
Aug 22 '12 at 0:34
add a comment |
up vote
8
down vote
You should run the following commands to restore the tmp folder.
sudo -i
# You now have a root prompt and do not need to continue typing sudo
mkdir /tmp
chmod 1777 /tmp
exit
Then you sould be all good
1
I think that exiting the root prompt after the steps would be worth mentioning.
– zxcdw
Aug 22 '12 at 0:34
add a comment |
up vote
8
down vote
up vote
8
down vote
You should run the following commands to restore the tmp folder.
sudo -i
# You now have a root prompt and do not need to continue typing sudo
mkdir /tmp
chmod 1777 /tmp
exit
Then you sould be all good
You should run the following commands to restore the tmp folder.
sudo -i
# You now have a root prompt and do not need to continue typing sudo
mkdir /tmp
chmod 1777 /tmp
exit
Then you sould be all good
edited Aug 22 '12 at 0:46
answered Aug 21 '12 at 22:24
Alex L.
2,5801218
2,5801218
1
I think that exiting the root prompt after the steps would be worth mentioning.
– zxcdw
Aug 22 '12 at 0:34
add a comment |
1
I think that exiting the root prompt after the steps would be worth mentioning.
– zxcdw
Aug 22 '12 at 0:34
1
1
I think that exiting the root prompt after the steps would be worth mentioning.
– zxcdw
Aug 22 '12 at 0:34
I think that exiting the root prompt after the steps would be worth mentioning.
– zxcdw
Aug 22 '12 at 0:34
add a comment |
up vote
4
down vote
To add to Alex's answer, you can do both those commands at the same time using the -m
or --mode
option for mkdir(1), which specifies the mode for the created directory:
-m, --mode=MODE set file mode (as in chmod), not a=rwx - umask
So the command would be:
sudo mkdir -m 1777 /tmp
add a comment |
up vote
4
down vote
To add to Alex's answer, you can do both those commands at the same time using the -m
or --mode
option for mkdir(1), which specifies the mode for the created directory:
-m, --mode=MODE set file mode (as in chmod), not a=rwx - umask
So the command would be:
sudo mkdir -m 1777 /tmp
add a comment |
up vote
4
down vote
up vote
4
down vote
To add to Alex's answer, you can do both those commands at the same time using the -m
or --mode
option for mkdir(1), which specifies the mode for the created directory:
-m, --mode=MODE set file mode (as in chmod), not a=rwx - umask
So the command would be:
sudo mkdir -m 1777 /tmp
To add to Alex's answer, you can do both those commands at the same time using the -m
or --mode
option for mkdir(1), which specifies the mode for the created directory:
-m, --mode=MODE set file mode (as in chmod), not a=rwx - umask
So the command would be:
sudo mkdir -m 1777 /tmp
answered Feb 11 at 17:55
strupo
413
413
add a comment |
add a comment |
up vote
-1
down vote
A reboot of the system will fix it up automatically, in case if you have issues with rebooting the system use sudo mkdir -m 1777 /tmp
should work fine as mentioned in other answers.
1
Duplicate of accepted answer.
– Fabby
Dec 4 at 7:23
Not really - this one uniquely suggests that rebooting will fix
– Zanna
Dec 4 at 10:54
1
And how will the user issue that command if they have trouble rebooting?
– Elder Geek
Dec 7 at 17:20
add a comment |
up vote
-1
down vote
A reboot of the system will fix it up automatically, in case if you have issues with rebooting the system use sudo mkdir -m 1777 /tmp
should work fine as mentioned in other answers.
1
Duplicate of accepted answer.
– Fabby
Dec 4 at 7:23
Not really - this one uniquely suggests that rebooting will fix
– Zanna
Dec 4 at 10:54
1
And how will the user issue that command if they have trouble rebooting?
– Elder Geek
Dec 7 at 17:20
add a comment |
up vote
-1
down vote
up vote
-1
down vote
A reboot of the system will fix it up automatically, in case if you have issues with rebooting the system use sudo mkdir -m 1777 /tmp
should work fine as mentioned in other answers.
A reboot of the system will fix it up automatically, in case if you have issues with rebooting the system use sudo mkdir -m 1777 /tmp
should work fine as mentioned in other answers.
answered Dec 4 at 6:53
Prashant Shubham
1
1
1
Duplicate of accepted answer.
– Fabby
Dec 4 at 7:23
Not really - this one uniquely suggests that rebooting will fix
– Zanna
Dec 4 at 10:54
1
And how will the user issue that command if they have trouble rebooting?
– Elder Geek
Dec 7 at 17:20
add a comment |
1
Duplicate of accepted answer.
– Fabby
Dec 4 at 7:23
Not really - this one uniquely suggests that rebooting will fix
– Zanna
Dec 4 at 10:54
1
And how will the user issue that command if they have trouble rebooting?
– Elder Geek
Dec 7 at 17:20
1
1
Duplicate of accepted answer.
– Fabby
Dec 4 at 7:23
Duplicate of accepted answer.
– Fabby
Dec 4 at 7:23
Not really - this one uniquely suggests that rebooting will fix
– Zanna
Dec 4 at 10:54
Not really - this one uniquely suggests that rebooting will fix
– Zanna
Dec 4 at 10:54
1
1
And how will the user issue that command if they have trouble rebooting?
– Elder Geek
Dec 7 at 17:20
And how will the user issue that command if they have trouble rebooting?
– Elder Geek
Dec 7 at 17:20
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2faskubuntu.com%2fquestions%2f178751%2faccidentally-deleted-tmp-folder%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