DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 28th September 2008
lumiwa lumiwa is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Thanked 4 Times in 3 Posts
Default user permission...

Hi!

I think that is something wrong with the user (mine) permission.
For example id I run as root in /home/ajtim folser ls -l I got (there are more):

drwxr-xr-x 2 ajtim wheel 512 Sep 25 18:06 .xine
-rw-r--r-- 1 ajtim wheel 15 Aug 11 16:21 .xinitrc
drwx------ 2 ajtim ajtim 512 Jun 18 15:45 Desktop
drwx------ 11 ajtim ajtim 1024 Sep 25 09:38 Documents

as user ajtim ls -l and I got:
drwx------ 2 ajtim 1002 512 Jun 18 15:45 Desktop
drwx------ 11 ajtim 1002 1024 Sep 25 09:38 Documents

and as user ls -la:
drwxr-xr-x 2 ajtim 0 512 Sep 25 18:06 .xine
-rw-r--r-- 1 ajtim 0 15 Aug 11 16:21 .xinitrc
drwx------ 2 ajtim 1002 512 Jun 18 15:45 Desktop
drwx------ 11 ajtim 1002 1024 Sep 25 09:38 Documents

User is member also of wheel and operator groups.

How should I ecit user account, please? I check /etc/group, passw and master.passwd and looks okay. Itry to change primary group with pw usermode -g wheel ajtim and I got:

pw: user name or id required

Thanks a lot...

Mitja
Reply With Quote
  #2   (View Single Post)  
Old 28th September 2008
PatrickBaer PatrickBaer is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 81
Thanked 1 Time in 1 Post
Default

I honestly don't see any problem?
Reply With Quote
  #3   (View Single Post)  
Old 28th September 2008
lumiwa lumiwa is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Thanked 4 Times in 3 Posts
Default

Quote:
Originally Posted by PatrickBaer View Post
I honestly don't see any problem?
I thought that for examle ls -l should shows the same for the user and root.

I am confused because miro player stopped working for user after one year and before that I run a script "lockdown" ( I deinstalled and put the system back as was before - I hope).
Reply With Quote
  #4   (View Single Post)  
Old 28th September 2008
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Thanked 49 Times in 43 Posts
Default

what the o/p of the following command:

$ ls -l /etc/group
Reply With Quote
  #5   (View Single Post)  
Old 28th September 2008
lumiwa lumiwa is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Thanked 4 Times in 3 Posts
Default

Quote:
Originally Posted by ephemera View Post
what the o/p of the following command:

$ ls -l /etc/group
(root)

-rw------- 1 root wheel 556 Sep 28 15:32 /etc/group

and ls -l (user)

-rw------- 1 root 0 556 Sep 28 15:32 /etc/group

One another problem. I use midnight commander and checked "chmod" of /ome/ajtim/.chrc
permission is 100644
owner ajtim (user as I logged in) and group name is 0.
ajtim is a member of the wheel group.
Now I tried to use chown and there are user name - ajtim but in group name is Unknown Group. Chown advanced command shown me group 0 but there are no other options. This works before because I use sometimes.
Reply With Quote
  #6   (View Single Post)  
Old 28th September 2008
lumiwa lumiwa is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Thanked 4 Times in 3 Posts
Default

Quote:
Originally Posted by lumiwa View Post
(root)

-rw------- 1 root wheel 556 Sep 28 15:32 /etc/group

and ls -l (user)

-rw------- 1 root 0 556 Sep 28 15:32 /etc/group

One another problem. I use midnight commander and checked "chmod" of /ome/ajtim/.chrc
permission is 100644
owner ajtim (user as I logged in) and group name is 0.
ajtim is a member of the wheel group.
Now I tried to use chown and there are user name - ajtim but in group name is Unknown Group. Chown advanced command shown me group 0 but there are no other options. This works before because I use sometimes.
I changed the permission of /etc/group and now I can use chown...
BTW: miro payer doesn;t works as user still.
Reply With Quote
  #7   (View Single Post)  
Old 29th September 2008
deemon's Avatar
deemon deemon is offline
Fdisk Soldier
 
Join Date: May 2008
Location: Estonia
Posts: 50
Thanked 6 Times in 5 Posts
Default

Make sure you use ls -la in all those cases.
In the examples you gave you used both ls -l and ls -la.
__________________
Fhtagn nagh Yog-Sothoth
Reply With Quote
  #8   (View Single Post)  
Old 29th September 2008
lumiwa lumiwa is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Thanked 4 Times in 3 Posts
Default

Quote:
Originally Posted by deemon View Post
Make sure you use ls -la in all those cases.
In the examples you gave you used both ls -l and ls -la.
root:
ls -la /etc/group
-rw-r--r-- 1 root wheel 556 Sep 28 15:32 /etc/group

user:

ls -la /etc/group
-rw-r--r-- 1 root wheel 556 Sep 28 15:32 /etc/group
Reply With Quote
  #9   (View Single Post)  
Old 29th September 2008
deemon's Avatar
deemon deemon is offline
Fdisk Soldier
 
Join Date: May 2008
Location: Estonia
Posts: 50
Thanked 6 Times in 5 Posts
Default

I was referring to your original post, where you where missing -a flag and therefore didn't show dot files.
__________________
Fhtagn nagh Yog-Sothoth
Reply With Quote
Old 29th September 2008
PatrickBaer PatrickBaer is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 81
Thanked 1 Time in 1 Post
Default

My FBSD machines also do show dot-files for root without the -a flag btw...
Reply With Quote
Old 29th September 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,075
Thanked 198 Times in 156 Posts
Default

-A is set automatically for the root user, from ls(1)
Code:
     -A      Include directory entries whose names begin with a dot (`.')
             except for . and ...  Automatically set for the super-user unless
             -I is specified.
You can use -I (That's a capital i) to prevent this, again from ls(1):
Code:
     -I      Prevent -A from being automatically set for the super-user.
IIRC -I was introduced in FreeBSD 6, it's not present in the other BSD's or GNU ls.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Old 29th September 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

CS is right, The -I argument is unsupported on OpenBSD.. the behaviour of -A is the same though.
Reply With Quote
Old 30th September 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Thanked 40 Times in 39 Posts
Default

The only issue is that the file /etc/group should be world-readable. Because it is not, ls is not able to look up the group name. It may also cause other problems. to fix:# chmod a+r /etc/group, as root.
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission problems after restore Crotalus FreeBSD Installation and Upgrading 3 5th February 2009 02:17 PM
FFS permission issue marc OpenBSD General 2 2nd February 2009 07:31 PM
MySQL permission oddity Mantazz FreeBSD Ports and Packages 4 13th December 2008 09:06 PM
Permission denied (publickey). Help pls rex FreeBSD General 13 14th October 2008 08:54 PM
Permission denied delboy FreeBSD Ports and Packages 11 24th May 2008 09:26 PM


All times are GMT. The time now is 01:52 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick