2

I have problem to change the permissions on a shared folder from Windows in elementary OS. I am using the chown command and it throws me the following error:

pablo@pablo:/home$ LANGUAGE=en sudo chown -R pablo /home/pablo/redwin
[sudo] password for pablo:
chown: changing ownership of ‘/home/pablo/redwin/pagefile.sys’: Device or resource busy
chown: changing ownership of ‘/home/pablo/redwin/RECYCLER/S-1-5-21-1606980848-152049171-839522115-1003’: Permission denied
chown: changing ownership of ‘/home/pablo/redwin/RECYCLER/S-1-5-21-2000478354-1214440339-1801674531-1003’: Permission denied
chown: changing ownership of ‘/home/pablo/redwin/System Volume Information’: Permission denied
chown: changing ownership of ‘/home/pablo/redwin’: Permission denied

It is a shared network folder.

Someone knows what could happen?

  • For the purpose of clear information for everyone, could you re-run this as LANGUAGE=en sudo chown -R pablo /home/pablo/redwin and add information on how you mount the shared network folder (via /etc/fstab or by hand every time)? – embik Jul 20 '15 at 15:33
  • please edit your original post (aka the question) with this, thank you! We still need to know how you mount the network share though. – embik Jul 20 '15 at 15:54
  • Ok!, sorry, I used /etc/fstab to mount: //192.168.0.3/hugo\040(d) /home/pablo/redwin cifs auto,user=pablo,password=34456631,exec,user,nounix,rw,iocharset=utf8 0 0 – Pablo Jul 20 '15 at 15:56
  • Do you want to change the file permissions on the Windows machine? Or do you want to change who can access the files on the Linux machine, without affecting the Windows machine? – Gilles Jul 20 '15 at 21:18
5

As cifs is kind of foreign concept to Linux, you cannot always use common Linux tools to change things like owner or permissions (especially regarding network shares). To get write access to your share, you will need to add options to your /etc/fstab entry, more specific the options uid and gid. Currently, the user root is mounting your network share during boot up, so the system does not know your want write access (respectively ownership) to it as well. To get the values for uid and gid, run id -u $USER (for your uid) and id -g $USER (for your gid).

Now, modify your /etc/fstab accordingly:

//path/to/share /mount/point cifs auto,user=<user>,password=<password>,exec,user,nounix,rw,iocharset=utf8,uid=<UID>,gid=<GID> 0 0
  • hey, it works! but I have another problem ... is with a particular program (dosbox) and the folder in question. the problem is that from the DOSBox fails to "see" folder and do not know why. I thought it was because the folder permissions but did not see that's not the problem. I would have to open a new post for this? Sorry if poorly drafted, I'm using google translate – Pablo Jul 21 '15 at 12:41
  • Yes, please consider to mark this as the answer that solved your problem and open a new question regarding your new issue :) – embik Jul 21 '15 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.