LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-24-2010, 07:09 AM   #16
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405

Hi again,

Nice to see that chown is working as designed on your box and your problem is fixed.

Might have been a typo after all.....
 
Old 07-24-2010, 09:48 AM   #17
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
Originally Posted by druuna View Post
This: chown -R userb:users /home/userb/.* (mind the dot in .*) is the same as chown -R userb:users /home/ (see post #8). Avoid using .* (dot star) in the chown command, the end result is probably not what you expect.
To include all of the dot files in a directory, I will use ".[^.]*" in order to exclude the parent directory "..".

If you want to change permissions on all files in a directory, use the "find" command to locate just files. You don't want to clear the "x" bit on directories. But for most directories, you don't want the "x" bit set.
 
1 members found this post helpful.
Old 07-27-2010, 07:02 AM   #18
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
Quote:
Originally Posted by druuna View Post
Hi,

The dot you are talking about (. between user and group) doesn't always work among the different flavours of chown out there. A : as separator does.

But besides that, that is not the issue here, the way chown interprets /home/user/ vs /home/user/* vs /home/user/.* is

Hope this helps.
Only thought i would mention that because of the difference between the flavours of chown. I had the same problem 8-9 years ago with chown doing the same thing. After fixing all the permission problems, seeing an example on the net somewhere used the dot, i then used that, never had a problem since.May have been coincidental, just thought It was worth a mention
 
Old 07-27-2010, 07:44 AM   #19
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Quote:
Originally Posted by fotoguy View Post
Only thought i would mention that because of the difference between the flavours of chown. I had the same problem 8-9 years ago with chown doing the same thing. After fixing all the permission problems, seeing an example on the net somewhere used the dot, i then used that, never had a problem since.May have been coincidental, just thought It was worth a mention
Use what works for you. I would have a look at the chown man page to make sure.

The chown version I use at home tells me to use the : (no mention of .), but both : and . work (which is not the case at work, only : works).
 
  


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
Variables and Mkvextract in a bash script and a good resource for bash help? gohmifune Linux - General 9 04-13-2011 08:37 AM
passing variable from bash to perl in a bash script quadmore Programming 6 02-21-2011 04:11 AM
[SOLVED] Using a long Bash command including single quotes and pipes in a Bash script antcore Linux - General 9 07-22-2009 11:10 AM
Strange if statement behaviour when using bash/bash script freeindy Programming 7 08-04-2008 06:00 AM
Bash script to create bash script jag7720 Programming 10 09-10-2007 07:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:38 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