4

I am trying to run a game on Wine, and for some reason after I run it one time, the files are locked after the first run and I can only open it using a Root account. I want to change ownership so that I can open the file with a regular account. I tried:

sudo chown -R Vince:evelauncher.sh

and I got this feedback:

chown: missing operand after ‘Vince:evelauncher.sh’ Try 'chown --help' for more information.

and of course the "help" menu wasn't much help lol

  • Others have already answered your question. I don't think you need the recursive -R option in this case, assuming evelauncher.sh is a file and not a directory containing other files. I would be careful of using -R option. Changing ownership of system folders and files can make a system unbootable. – user68186 Aug 31 '17 at 20:09
  • Thanks for pointing that out user68186. I'm not sure what I should use in place of R? ALso just FYI, the evelauncher.sh file is not the only file in that folder showing as locked. SHould I try again and use the R option, but change ownership of the whole folder instead of just the evelauncher.sh file? I should also ad that the game is running fine now with the command I used...although I have not tried rebooting. – vince Aug 31 '17 at 20:22
  • If it works let it be. Rebooting should not change anything. You may also give yourself (and others) permission to read, write, and execute the file without changing ownership. See askubuntu.com/questions/470831/… – user68186 Aug 31 '17 at 20:39
2

The correct syntax of chown command is:

sudo chown user:group file

so you have to use it like:

sudo chown -R Vince:  evelauncher.sh

Pay attention to the space, by leaving the group section it will be automatically set to your primary group.

  • 2
    you beat me by only a few seconds gosh darn thee. – Thomas Ward Aug 31 '17 at 20:04
  • Yep :D :D :D ... – Ravexina Aug 31 '17 at 20:05
  • It was a valiant effort Ravexin, I wish I could mark them both as the solution! It's amazing how little details like that make all the difference with code. Thanks! I'll try to be more detail oriented in the future:)...EDIT: wait I thought Thomas was first because he was showing on top. I changed the marked solution to the first responder – vince Aug 31 '17 at 20:15
  • @vince I'm Glad that it was helpful ;) – Ravexina Sep 1 '17 at 4:12
  • Just a minor correction: if you do USER: it assumes you want user and group to be the same. The extra space you added does nothing, and is unnecessary. – Thomas Ward Sep 1 '17 at 15:19
2

sudo chown -R Vince:evelauncher.sh is an incomplete command.

The proper usage of chown is as follows:

chown [options] USER[:GROUP] file

(in your command, -R for recursive is an option)

Your line does not put a space between the Vince: (user and group designator) and the file name, so it doesn't work. You need to use spaces such that you end up with this:

sudo chown -R Vince: evelauncher.sh

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.