- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- rm vs. rm -f
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
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
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
тАО03-16-2006 01:43 PM
тАО03-16-2006 01:43 PM
I have an Oracle User Directory that is blown up 777. Files below that have permissions set to 644. Because of the directory setup any one can drop or files in and such. However my question is this. When a user attemptes to "rm" a file they get prompted to change mode to 644 but the file does not get removed unless they are the owner. However if they do an rm -f to the file it gets removed. Following the standard security that UX follows the strictist rule the file should not have been removed unless the owner or root did the removing of the file. Why is this permitted?
It is a HP-UX 11i (11.11) current on all patches. My person belief is because the directory structure set to by the DBA as they are the owner of the sctructre is set to 777. It see's the removal of the file as a change to the directory when a force is given vs. a file change when just an rm is issued.
Thanks for the info.
-Al
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2006 02:48 PM
тАО03-16-2006 02:48 PM
Re: rm vs. rm -f
The file perms do not matter, if dir has open perms to everyone.
Check your alises.
alias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2006 02:49 PM
тАО03-16-2006 02:49 PM
Re: rm vs. rm -f
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2006 02:53 PM
тАО03-16-2006 02:53 PM
Re: rm vs. rm -f
Yes rm should be used by -i which will request confirmation before removing each entry.
If you have the directory permissions as 775 or 755 then other users other than the owner cannot delete files withtin the directory.
And here is rm VS rm -f
The rm command removes the entries for one or more files from a directory. rm ├в f (force option forces each file or directory to be removed without prompting for confirmation, regardless of the permissions of the entry. This option also suppresses diagnostic messages regarding nonexistent operands.
IA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2006 03:03 PM
тАО03-16-2006 03:03 PM
Solutionman rm says,
rm recognizes the following options:
-f Force each file or directory to be removed without prompting for confirmation, regardless of the permissions of the entry. This option also suppresses diagnostic messages regarding nonexistent operands.
This option does not suppress any diagnostic messages other than those regarding nonexistent operands. To suppress all error message and interactive prompts, the -f option should be used while redirecting standard error output to /dev/null.
This option ignores any previous occurrence of the -i option.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2006 03:11 PM
тАО03-16-2006 03:11 PM
Re: rm vs. rm -f
rm - grace fule , asks for confirmation etc
rm -f -- fourecfull remove
Regards,
Siva.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2006 04:02 PM
тАО03-16-2006 04:02 PM
Re: rm vs. rm -f
a) i) rm will make diagnostic error messages when the file is not existing
ii) rm -f will not make any error messages. It will redirect error messages to /dev/null
b) i) While deletion of file, rm will check file permissions.
ii) rm -f will not care about permission and will delete files
rm -f will not care about confirmation. It is differing with rm -i here.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2006 06:50 PM
тАО03-16-2006 06:50 PM
Re: rm vs. rm -f
the proof that delete priv comes from the directory:
mkdir /tmp/test
chmod 755 /tmp/test
cd /tmp/test
touch a
chmod 777 a
Another user can now enter the /tmp/test dir, edit and update the file, but can not remove it.
From man rm:
"Removal of a file requires write and search (execute) permission in its directory, but no permissions on the file itself."
Also the rm -f of a non-existent file is 0 (success), whereas rm of a non-existent file return 2(error).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2006 01:11 AM
тАО03-17-2006 01:11 AM
Re: rm vs. rm -f
I will be assigning points shortly.
-Al