cifs mounting all files as root owner
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I am trying to access a win7 machine that has sharing enabled on a folder. When I mount it on linux it lists all files as -rwxr-xr-x 1 root root
If i sudo i can copy files back and forth but its read only if I dont.
sudo chown [standard_user] *
on the mounted share does nothing.
This mounts the share as read only (all files are root)
sudo mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,rw
On the win7 box I have myuser and everyone as 'full control'
how do I mount this share so that I dont have to be root to delete/move files?
cifs
add a comment |
I am trying to access a win7 machine that has sharing enabled on a folder. When I mount it on linux it lists all files as -rwxr-xr-x 1 root root
If i sudo i can copy files back and forth but its read only if I dont.
sudo chown [standard_user] *
on the mounted share does nothing.
This mounts the share as read only (all files are root)
sudo mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,rw
On the win7 box I have myuser and everyone as 'full control'
how do I mount this share so that I dont have to be root to delete/move files?
cifs
add a comment |
I am trying to access a win7 machine that has sharing enabled on a folder. When I mount it on linux it lists all files as -rwxr-xr-x 1 root root
If i sudo i can copy files back and forth but its read only if I dont.
sudo chown [standard_user] *
on the mounted share does nothing.
This mounts the share as read only (all files are root)
sudo mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,rw
On the win7 box I have myuser and everyone as 'full control'
how do I mount this share so that I dont have to be root to delete/move files?
cifs
I am trying to access a win7 machine that has sharing enabled on a folder. When I mount it on linux it lists all files as -rwxr-xr-x 1 root root
If i sudo i can copy files back and forth but its read only if I dont.
sudo chown [standard_user] *
on the mounted share does nothing.
This mounts the share as read only (all files are root)
sudo mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,rw
On the win7 box I have myuser and everyone as 'full control'
how do I mount this share so that I dont have to be root to delete/move files?
cifs
cifs
asked Mar 7 '17 at 17:04
flashc5flashc5
1814
1814
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Try the following. Works fine for me.
sudo mount -t cifs -o vers=1.0,username=myuser,pass=mypass "//myipaddress/myshare" /home/myuser/mymount/
add a comment |
mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,uid=myusername,gid=users
If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!
– Arronical
Mar 7 '17 at 17:16
i alsways do, it makes you wait so many minutes before you can mark it as the answer
– flashc5
Mar 7 '17 at 17:25
This worked, but all the files created through the mount are now-rwxrwxrwx. Is there a way to change this?
– Rogier Lommers
Sep 10 '18 at 18:34
@RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).
– Bruni
Sep 11 '18 at 6:27
add a comment |
You have to make sure the mounting target is owned by the user/group first.
sudo chown myusername:mygroupname /mymount/
while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing
– j-money
Mar 27 at 10:23
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',
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%2faskubuntu.com%2fquestions%2f890579%2fcifs-mounting-all-files-as-root-owner%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try the following. Works fine for me.
sudo mount -t cifs -o vers=1.0,username=myuser,pass=mypass "//myipaddress/myshare" /home/myuser/mymount/
add a comment |
Try the following. Works fine for me.
sudo mount -t cifs -o vers=1.0,username=myuser,pass=mypass "//myipaddress/myshare" /home/myuser/mymount/
add a comment |
Try the following. Works fine for me.
sudo mount -t cifs -o vers=1.0,username=myuser,pass=mypass "//myipaddress/myshare" /home/myuser/mymount/
Try the following. Works fine for me.
sudo mount -t cifs -o vers=1.0,username=myuser,pass=mypass "//myipaddress/myshare" /home/myuser/mymount/
answered Oct 29 '17 at 22:26
matson kepsonmatson kepson
1262
1262
add a comment |
add a comment |
mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,uid=myusername,gid=users
If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!
– Arronical
Mar 7 '17 at 17:16
i alsways do, it makes you wait so many minutes before you can mark it as the answer
– flashc5
Mar 7 '17 at 17:25
This worked, but all the files created through the mount are now-rwxrwxrwx. Is there a way to change this?
– Rogier Lommers
Sep 10 '18 at 18:34
@RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).
– Bruni
Sep 11 '18 at 6:27
add a comment |
mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,uid=myusername,gid=users
If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!
– Arronical
Mar 7 '17 at 17:16
i alsways do, it makes you wait so many minutes before you can mark it as the answer
– flashc5
Mar 7 '17 at 17:25
This worked, but all the files created through the mount are now-rwxrwxrwx. Is there a way to change this?
– Rogier Lommers
Sep 10 '18 at 18:34
@RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).
– Bruni
Sep 11 '18 at 6:27
add a comment |
mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,uid=myusername,gid=users
mount -t cifs "//myipaddress/myshare" /home/myuser/mymount/ -o username=myusername,password=mypassword,uid=myusername,gid=users
answered Mar 7 '17 at 17:07
BruniBruni
5,19142656
5,19142656
If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!
– Arronical
Mar 7 '17 at 17:16
i alsways do, it makes you wait so many minutes before you can mark it as the answer
– flashc5
Mar 7 '17 at 17:25
This worked, but all the files created through the mount are now-rwxrwxrwx. Is there a way to change this?
– Rogier Lommers
Sep 10 '18 at 18:34
@RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).
– Bruni
Sep 11 '18 at 6:27
add a comment |
If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!
– Arronical
Mar 7 '17 at 17:16
i alsways do, it makes you wait so many minutes before you can mark it as the answer
– flashc5
Mar 7 '17 at 17:25
This worked, but all the files created through the mount are now-rwxrwxrwx. Is there a way to change this?
– Rogier Lommers
Sep 10 '18 at 18:34
@RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).
– Bruni
Sep 11 '18 at 6:27
If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!
– Arronical
Mar 7 '17 at 17:16
If an answer helps you, accept it by clicking on the small grey tick/check beneath the number on the left hand side of the answer @flashc5 , once you have enough reputation you can upvote too. All this information is in the tour, reading it will also get you your first badge woo-hoo!
– Arronical
Mar 7 '17 at 17:16
i alsways do, it makes you wait so many minutes before you can mark it as the answer
– flashc5
Mar 7 '17 at 17:25
i alsways do, it makes you wait so many minutes before you can mark it as the answer
– flashc5
Mar 7 '17 at 17:25
This worked, but all the files created through the mount are now
-rwxrwxrwx. Is there a way to change this?– Rogier Lommers
Sep 10 '18 at 18:34
This worked, but all the files created through the mount are now
-rwxrwxrwx. Is there a way to change this?– Rogier Lommers
Sep 10 '18 at 18:34
@RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).
– Bruni
Sep 11 '18 at 6:27
@RogierLommes I do not think that this is possible on a per file basis (as MS file systems do not support linux file permissions).
– Bruni
Sep 11 '18 at 6:27
add a comment |
You have to make sure the mounting target is owned by the user/group first.
sudo chown myusername:mygroupname /mymount/
while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing
– j-money
Mar 27 at 10:23
add a comment |
You have to make sure the mounting target is owned by the user/group first.
sudo chown myusername:mygroupname /mymount/
while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing
– j-money
Mar 27 at 10:23
add a comment |
You have to make sure the mounting target is owned by the user/group first.
sudo chown myusername:mygroupname /mymount/
You have to make sure the mounting target is owned by the user/group first.
sudo chown myusername:mygroupname /mymount/
answered Mar 27 at 1:22
ImMartianImMartian
1
1
while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing
– j-money
Mar 27 at 10:23
add a comment |
while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing
– j-money
Mar 27 at 10:23
while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing
– j-money
Mar 27 at 10:23
while this solution is correct, I would advise against blindly changing permissions/ownership of files/directories if you don't know what you're doing
– j-money
Mar 27 at 10:23
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.
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%2f890579%2fcifs-mounting-all-files-as-root-owner%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