Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see:
viewtopic.php?t=158230
If none of the specific sub-forums seem right for your thread, ask here.
banderas20
Posts: 111 Joined: 2016-11-10 15:30
#1
Post
by banderas20 » 2018-07-19 08:18
Hello,
I have installed cifs-utils to be able to access Windows folders from Debian.
I have issued:
Code: Select all
sudo mount.cifs //192.168.1.137/shared ./Win-share/ -o user=user1 rw
The share mounts, but I can only read files. I'm unable to write anything to the windows share.
Also, i switch to root and I do:
Code: Select all
chmod -R 777 Win-share/
chmod: changing permissions of 'Win-share/': Permission denied
¿What am I doing wrong?
Thanks!
Last edited by
banderas20 on 2018-07-23 13:31, edited 1 time in total.
arzgi
Posts: 1197 Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times
#2
Post
by arzgi » 2018-07-19 09:22
banderas20 wrote: Hello,
I have installed cifs-utils to be able to access Windows folders from Debian.
I have issued:
Code: Select all
s[code]udo mount.cifs //192.168.1.137/shared ./Win-share/ -o user=user1 rw
[/code]
The share mounts, but I can only read files. I'm unable to write anything to the windows share.
Also, i switch to root and I do:
Code: Select all
chmod -R 777 Win-share/
chmod: changing permissions of 'Win-share/': Permission denied
¿What am I doing wrong?
Thanks!
cifs-utils man page has explanation, why chown does not work. Try mounting like this:
Code: Select all
sudo mount -t cifs -o rw,user,exec //192.168.1.137/shared ./Win-share/
banderas20
Posts: 111 Joined: 2016-11-10 15:30
#3
Post
by banderas20 » 2018-07-19 11:06
Hello and thanks for replying.
I issue the command, replacing "user" for the real username and it prompts me:
Code: Select all
Password for root@//192.168.1.137/shared: ******
mount error(22): Invalid argument
¿Why does it ask for 'root'? ¿What does the 'exec' do?
Thanks!
gjaltemba
Posts: 3 Joined: 2018-07-16 20:53
#4
Post
by gjaltemba » 2018-07-19 13:37
Code: Select all
Usage: mount.cifs <remotetarget> <dir> -o <options>
Mount the remote target, specified as a UNC name, to a local directory.
Options:
user=<arg>
pass=<arg>
dom=<arg>
arzgi
Posts: 1197 Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times
#5
Post
by arzgi » 2018-07-19 13:41
banderas20 wrote: Hello and thanks for replying.
I issue the command, replacing "user" for the real username and it prompts me:
Code: Select all
Password for root@//192.168.1.137/shared: ******
mount error(22): Invalid argument
¿Why does it ask for 'root'? ¿What does the 'exec' do?
Thanks!
user is option like exec, is not meant to replaced by username. exec allows running binaries, that is often added, because user option reduces rights. But you can leave exec out, if you dont need it.
banderas20
Posts: 111 Joined: 2016-11-10 15:30
#6
Post
by banderas20 » 2018-07-23 13:31
Solved this way:
Code: Select all
sudo mkdir WinShare && sudo chmod 755 WinShare
sudo mount -t cifs //win_box/shared WinShare -o username=me,uid=me,gid=me
I think "win_box" must be the same in both hosts file and the real hostname of the Windows machine.
Thanks!