![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| file access rights? | vkishore.btw | UNIX for Dummies Questions & Answers | 1 | 04-25-2008 06:53 AM |
| FTP rights | Burhan | SUN Solaris | 2 | 03-15-2007 04:22 AM |
| Unix access rights | rudo | UNIX for Dummies Questions & Answers | 1 | 02-26-2007 03:40 PM |
| User rights | sharmavr | HP-UX | 1 | 07-25-2006 12:16 AM |
| Groups Rights | niasdad | UNIX Desktop for Dummies Questions & Answers | 3 | 07-16-2002 06:01 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
chmod rights issue?
I want to grant the 'write' right to one user so they can delete log files in a given directory. These are http log files, so a new one is created each day. The file owner is 'nobody'. If I use the command 'chmod a=rwx *' will this work for the new files created each day.
I've tried the command 'chmod username+rwx *' and I get an error message that reads chmod: ERROR: invalid mode. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
your syntax is incorrect. proper usage of the chmod command is:
chmod [+/-]drwx file or directory name what it seems you want however, is to add that user to a group that has the rights to edit these files. so, say you have a file access_log, this file has the premissions set to: -rw-r--r-- the owner of this file is nobody, and lets just say the group is httpd. so you could chmod +w access_log to add write privelages to users in the group assigned to that file. then you add your user to that group, httpd. Last edited by norsk hedensk; 01-15-2004 at 12:08 PM. |
|
#3
|
||||
|
||||
|
Actually to delete a file, you need write permission to the directory. rm gives you an error if you try to delete a file that can't write. But "rm -f" forces the issue.
But if you can't write to the directory, there is no way. The kernel enforces that. |
|
#4
|
|||
|
|||
|
ok, i need help creating the group and adding the user to the group. i'm using solaris 5.6, my aix man page says to use the command 'mkgroup'.
i've tried 'mkgroup' and 'mkgrp' solaris returns 'mkgrp or mkgroup not found'. and, wouldn't you have to specify the group in the chmod command. my unix book has the example chmod g+x filename. i'm assuming you would replace filename with the directory name. if the group name is httpd would the command be chmod httpd+x directory name? |
|
#5
|
||||
|
||||
|
On solaris use groupadd.
The g is a constant. You don't replace it with the groupname. chgrp httpd /some/directory chmod g+w /some/directory |
|
#6
|
|||
|
|||
|
how to i add the user to the group?
|
|
#7
|
||||
|
||||
|
I would just "vi /etc/group". But you can use:
usermod -G groupname username |
||||
| Google The UNIX and Linux Forums |