- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- User unable to write to file created by root
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2006 03:35 PM
10-01-2006 03:35 PM
User unable to write to file created by root
I have a file created by root and I need to be able to write to that file by other users, for example, operator. So I chown-ed the file to operator:None and chmod-ed to 777. And still I can't write to it as operator. Am I missing something here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2006 03:42 PM
10-01-2006 03:42 PM
Re: User unable to write to file created by root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2006 03:50 PM
10-01-2006 03:50 PM
Re: User unable to write to file created by root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2006 06:35 PM
10-01-2006 06:35 PM
Re: User unable to write to file created by root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2006 07:29 PM
10-01-2006 07:29 PM
Re: User unable to write to file created by root
are you sure about your group of 'None'.
But this should not matter.
Starting at the beginning of your path create dummy files until you are not allowed to do so.
For Example:
/var/adm/logs/data.txt is your real file
touch /var/data.txt
touch /var/adm/data.txt
touch /var/adm/logs/data.txt
Please ensure you use an unused filename, otherwise you may overwrite. One of the touch statements will fail, which will give you the directory you need to chmod.
Just out of interest, please give exact error message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2006 07:39 PM
10-01-2006 07:39 PM
Re: User unable to write to file created by root
Yes, the group is None.
The error message is from an external program that runs in the HP-UN environment.
The directory is one level only and it has been changed chown-ed and chmod-ed already. It still doesn't allow me to write even it's 777 and operator:None.. sigh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2006 07:40 PM
10-01-2006 07:40 PM
Re: User unable to write to file created by root
What does e.g.
/usr/sbin/fuser /path/to/unwritable_file
display?
But I am not sure, as I think that the common locking mechanism on Unix is merely "advisory",
(and if you writing attempt doesn't use the fcntl() syscall I think what I said is nonsense).
Or, is the file residing on an NFS mount?
Or, is your OS Linux?
There the owner has (at least for files on ext[23]fs, I think) can set additional attributes with chattr to make a file unchangable with the common OS file tools.
Execute an lsattr on the file to see the details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2006 08:14 PM
10-01-2006 08:14 PM
Re: User unable to write to file created by root
'The error message is from an external program ...' - is the program writing to the file or do you write with - for ex. - vi-editor?
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2006 02:17 AM
10-02-2006 02:17 AM
Re: User unable to write to file created by root
root should NOT be creating files for users. A normal user should create the file with umask set to 002 or 007. For 002, your file will be created with 664 (read/write by owner and group, read by anyone else) or 660 (read/write by owner and group, no one else can look at the file. The user may need to change the group ownership if the user's default is not the desired group
Now group=none is strange. I would start by creating a specific group based on the use of these files, perhaps acctg or finance or project1, whatever. Then add the various users to that group. To be sure that users have the right settings, login as the user and type the command: id That will report on the user ID and all group IDs.
Now as to a location, / (the root dirfectory) is the WORST possible location. This directory is critical to operation of the systemj and if you have a 777 file, then anyone can dump whatever they want into that file, fill the / filesystem and disable almost everything. And IMMEDIATELY change / back to 755 with owner root:root. If you don't you're going to have a number of insidious errors start occuring with system admin commands.
The correct location for data files would be either /var/tmp (perhaps a directory called /var/tmp/datafiles) or an application directory in /opt. The permission for the datafiles directory would be 775 with owner and group set appropriately. I would NOT use a user ID called operator except possibly for some backup administrator tasks. Every user has their own login for accountability and you add groups as needed for each user.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2006 12:42 PM
10-02-2006 12:42 PM
Re: User unable to write to file created by root
Try getacl(1) to see if some restricted access have been set.
Regards,
JPH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2006 01:17 AM
10-03-2006 01:17 AM
Re: User unable to write to file created by root
the best would be, to answer Patricks question first - send us the output of
ls -ld /path/to/dir /path/to/dir/file
mfG Peter