LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-05-2015, 03:51 PM   #1
green ice
Member
 
Registered: Jun 2015
Posts: 152

Rep: Reputation: Disabled
how to find missing operand in command


I tried this command in the terminal. How do I find the missing operand to activate the command, please?

the command is: chown -R /home/username/.ICEauthority

"[username]@[username-computer model] ~ $ su
Password:
[username-computer model] [username] # chown -R /home/[username]/.ICEauthority
chown: missing operand after ‘/home/[username]/.ICEauthority’
Try 'chown --help' for more information.
[username-computermodel] [username] # "
 
Old 09-05-2015, 04:06 PM   #2
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by green ice View Post
I tried this command in the terminal. How do I find the missing operand to activate the command, please?

the command is: chown -R /home/username/.ICEauthority

"[username]@[username-computer model] ~ $ su
Password:
[username-computer model] [username] # chown -R /home/[username]/.ICEauthority
chown: missing operand after /home/[username]/.ICEauthority
Try 'chown --help' for more information.
[username-computermodel] [username] # "
chown requires at least the username (owner) as argument.

Code:
$ chown --help
Usage: chown [OPTION]... [OWNER][:[GROUP]] FILE...
...

Last edited by hortageno; 09-05-2015 at 04:09 PM.
 
1 members found this post helpful.
Old 09-05-2015, 04:22 PM   #3
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
how to find missing operand in command

chown is for change owner, you have to assign the new owner.

chown -R user directory
 
1 members found this post helpful.
Old 09-06-2015, 07:33 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I suggest some Linux Basics study:
### Beginner User Guides: ###
http://rute.2038bug.com/index.html.gz
Linux for Beginners, Multiple Howtos, Manpages etc...
Ultimate Linux Newbie Guide
Tips for Linux
Linux Survival
 
1 members found this post helpful.
Old 09-06-2015, 10:39 AM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
You're also running "chown -R" which is to recursively change permissions in a directory against the single file .ICEauthority.
This begs the question of why you are doing that in the first place? What's the actual issue you're trying to resolve?
 
1 members found this post helpful.
Old 09-06-2015, 03:53 PM   #6
green ice
Member
 
Registered: Jun 2015
Posts: 152

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
You're also running "chown -R" which is to recursively change permissions in a directory against the single file .ICEauthority.
This begs the question of why you are doing that in the first place? What's the actual issue you're trying to resolve?
Every time I log in I get the little white box that says .ICEauthority cannot be updated. I click logout then LM logs in regularly.

I think this is a file permissions issue, although some say it is because I encrypted the home directory when I first installed LM and will just have to delete, format the partition, and reinstall LM.

I am researching file permissions to see if I can solve the problem in another way.

In the ubuntu forum thread linked by another poster in this thread, it says I may already have done damage by using -R, but so far everything is fine.

Last edited by green ice; 09-06-2015 at 04:10 PM.
 
Old 09-06-2015, 03:57 PM   #7
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Perhaps you want to do something like the following:
http://ubuntuforums.org/showthread.php?t=1906789
 
1 members found this post helpful.
Old 09-06-2015, 04:00 PM   #8
green ice
Member
 
Registered: Jun 2015
Posts: 152

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hortageno View Post
chown requires at least the username (owner) as argument.

Code:
$ chown --help
Usage: chown [OPTION]... [OWNER][:[GROUP]] FILE...
...
Yes I accessed help and have read the options but don't see how they apply yet.

It seems to me I did include username 3 times:
"[username-computer model] [username] # chown -R /home/[username]/.ICEauthority
chown: missing operand after /home/[username]/.ICEauthority"

Are you saying my username (root) should go after the final .ICEauthority?

In other words the file .ICE authority is misbehaving , so I am trying to change its ownership back to myself.

Last edited by green ice; 09-06-2015 at 04:02 PM.
 
Old 09-06-2015, 04:09 PM   #9
green ice
Member
 
Registered: Jun 2015
Posts: 152

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
Perhaps you want to do something like the following:
http://ubuntuforums.org/showthread.php?t=1906789
It looks the first step in the thread your reference is to do something like this:

ls -ld ../kevin /home
drwxr-xr-x 35 kevin kevin 12288 2012-01-10 19:36 ../kevin
drwxr-xr-x 5 root root 4096 2011-01-14 23:01 /home

ls -l is a report command. How would I phrase the first line?
[my user prompt] ls -l then ?

Also in this thread it says to do this:
"cd /home/kevin
sudo touch .ICEauthority # creates blank file with name .ICEauthority
sudo chown kevin:kevin .ICEauthority # makes "kevin" owner of the file
sudo chmod 600 .ICEauthority # sets permissions to "-rw-------" (read/write access to owner only)"

I can do this after I found out what touch means. I believe I have already deleted .ICEauthority with the rm command. If not I can delete it again then input this code.

Last edited by green ice; 09-06-2015 at 04:18 PM.
 
Old 09-06-2015, 04:17 PM   #10
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
The things you should be looking to do first are delete the file then carry out the following:
Code:
cd /home/kevin
sudo touch .ICEauthority
sudo chown kevin:kevin .ICEauthority
sudo chmod 600 .ICEauthority
But don't forget to substitute your username for kevin in the above. Those steps are doing the following:
Chance directory to your home directory (you type your username and not kevin).
Make a file called .ICEauthority.
Change the owner of the file to username and group called kevin (for which you substitute your own name).
Change the permissions of the file to read and write for the owner only.
http://www.thinkplexx.com/learn/arti...00-777-100-etc
 
1 members found this post helpful.
Old 09-09-2015, 06:48 PM   #11
green ice
Member
 
Registered: Jun 2015
Posts: 152

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
The things you should be looking to do first are delete the file then carry out the following:
Code:
cd /home/kevin
sudo touch .ICEauthority
sudo chown kevin:kevin .ICEauthority
sudo chmod 600 .ICEauthority
But don't forget to substitute your username for kevin in the above. Those steps are doing the following:
Chance directory to your home directory (you type your username and not kevin).
Make a file called .ICEauthority.
Change the owner of the file to username and group called kevin (for which you substitute your own name).
Change the permissions of the file to read and write for the owner only.
http://www.thinkplexx.com/learn/arti...00-777-100-etc
to I would type:
==========================================
cd /home/[my username]
sudo touch .ICEauthority
sudo chown [my username]:[my username] .ICEauthority
sudo chmod 600 .ICEauthority
===================================================

why wouldn't I want to do all this as root?

Why wouldn't I give myself, as owner and root, execute (x) permissions also?
 
Old 09-09-2015, 11:36 PM   #12
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
In a general manner, being root follows the rule "the less,the better ".

Files are never given the execute (x) rights unless they need it (scripts that you *really want* to run).

BTW be carefull not to type the prompt as a command. If I remember well, on forums the users prompts end with # and the root prompt ends with $
 
1 members found this post helpful.
Old 09-10-2015, 01:00 AM   #13
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
If this is in your personal (non-root) dir, then you shouldn't need sudo.

@Tonus: other way around: # = root, $ = non-root (assuming usual defaults...)
 
1 members found this post helpful.
Old 09-10-2015, 01:13 AM   #14
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by chrism01 View Post
If this is in your personal (non-root) dir, then you shouldn't need sudo.

@Tonus: other way around: # = root, $ = non-root (assuming usual defaults...)
Sorry, yes this is quite right. It may be necessary to sudo to remove the existing file but those steps don't need sudo.
My apologies, I hadn't twigged when copying over.
 
Old 09-10-2015, 11:01 AM   #15
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Quote:
Originally Posted by chrism01 View Post
@Tonus: other way around: # = root, $ = non-root (assuming usual defaults...)
Arf, one chance out of two... :-/ Lost :-(

Should type whoami next time. thanks for correcting !
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cli command to search and play youtube video: tr: missing operand stf92 General 6 08-09-2015 12:01 PM
cp: missing file operand postcd Linux - General 3 12-02-2013 09:58 AM
chown giving operand missing error Jhinukk Linux - General 1 06-25-2012 04:45 AM
MailScanner: chown: missing operand after `postfix' chengli Linux - Server 1 01-14-2012 11:04 AM
[SOLVED] acroread gives me dirname:missing operand slackingclement Slackware 2 07-03-2011 08:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration