![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Open source video editing: what we have now and what we need | iBot | UNIX and Linux RSS News | 0 | 04-10-2008 05:00 PM |
| How to editing a txt file | aaabbb123123 | Shell Programming and Scripting | 3 | 03-07-2008 12:31 AM |
| Editing File using awk/sed | Mohammed | Shell Programming and Scripting | 4 | 05-16-2007 12:00 PM |
| Editing the File using Awk | awk_beginner | Shell Programming and Scripting | 3 | 04-06-2007 11:43 AM |
| File editing using awk | rinku11 | Shell Programming and Scripting | 2 | 11-23-2006 11:34 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
can't open file for editing
I've created a user and would like to an an alias to the .bashrc file, however when I use vi and write to the file the following is displayed:
".bashrc" E212: Can't open file for writing. Hit ENTER or type command to continue. Entry within /etc/passwd for this user reads: maqui:x:513:516::/home//maqui::/bin/bash ![]() |
|
||||
|
Thanks for the hint
I created .bashrc manually and now it seems to work. So basically:1. I created user using adduser 2. Updated alias within the home directory i.e. /home/<user> 3. Updated permissions on the source file using chmod 755, so that the user can execute the file. Did I "allow too much" in step 3? |
|
||||
|
What do you mean by "alias"? A symbolic link to /etc/skel/.bashrc? Doesn't adduser automatically copy in a fresh .bashrc for you?
If you are editing .bashrc and it's a symbolic link, you need write permission to the target of the symbolic link. But instead, you should have a separate file owned by the user, usually a copy of /etc/skel/.bashrc If you are editing a file owned by a different user, you need to be root, or the file's permissions need to be relaxed enough to allow you to overwrite the file (and, the way editors often work, probably write access to the directory). This is of course not really a good idea in any event. .bashrc doesn't need execute permission, it's sourced (not executed) by bash. Last edited by era; 08-23-2008 at 03:29 PM.. Reason: Don't need execute permission; need write access to target of symlink |
![]() |
| Bookmarks |
| Tags |
| bashrc, permissions, vi_editor |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|