- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Spooled output from sqlplus "File permission Probl...
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
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
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
тАО09-14-2005 03:44 PM
тАО09-14-2005 03:44 PM
Hi guys,
I've been encountering this problem on one of our DB server. With regards to File permission, my problem is whenever i execute this specific shell script where it is composed of SQL scripting. The generated file by the program or the spooled file will definitely be under oracle as the owner of the file but the problem is i want the file permission of the spooled file will have RWXR-XR-X permission. Is there any parameter i should add on the DB/.profile/script. By the way i already explicitly declared on my .profile the umask as 022.
best regards,
Joaq's
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2005 04:33 PM
тАО09-14-2005 04:33 PM
Re: Spooled output from sqlplus "File permission Problem"
Umask can never put in what was not already there. To set the execution bit requires an explicit chmod after the file has been created.
If you were programming in C (or Perl), for example, then it is possible to set the executable bit when the file is created but not from the shell or sqlplus.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2005 05:04 PM
тАО09-14-2005 05:04 PM
Re: Spooled output from sqlplus "File permission Problem"
The user file creation mode mask (umask) is a built-in shell command that may be used to set default values for the read/write/execution permissions on newly created files. It should be executed in either the ".cshrc" or ".profile" shell startup files.
It is given a three-digit octal value, which represents the binary inverse of the permissions which may be assigned to files. This three-digit numeric argument represents the access to be "inhibited" or "masked out" when a file is created.
By default, most UNIX versions specify an octal mode of 666 (any user can read or write the file) when they create new files. Likewise, new programs are created with a mode of 777 (any user can read, write, or execute the program). For regular files will have a mode of 666 (rw-rw-rw)
The most common umask values are 022, 027, and 077. A umask value of 022 lets the owner both read and write all newly created files, but everybody else can only read them:
0666 Default file creation mode
022 resultant mode
0644 resultant mode
A umask value of 077 lets only the files owner read all newly created files:
0666 Default file creation mode.
077 umask
0600 resultant mode
On many UNIX systems, the default umask is 022. This is inherited from the init process, as all processes are descendants of init.
Indira A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2005 05:30 PM
тАО09-14-2005 05:30 PM
Re: Spooled output from sqlplus "File permission Problem"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2005 06:31 PM
тАО09-14-2005 06:31 PM
Re: Spooled output from sqlplus "File permission Problem"
The file permissions is not a function of the UTL_FILE package at all. The concept is if you are establishing a local session on the server, then the shadow process you started inherits the permissions as you logged in as.
However if you login from a remote client say a SQL+ session from a NT workstation, then the file inherits the permission of the TNS Listener. The TNS Listener permission is that permission as at the time when the listener was started by the oracle user.
If you have metalink account then refer to Note:197201.1 - How to Change Owner/Permissions for Files Created by UTL_FILE
Indira A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-14-2005 09:27 PM
тАО09-14-2005 09:27 PM
Re: Spooled output from sqlplus "File permission Problem"
if you run the script from the same machine you would not need to use the listener process and therefore the oracle process will be owned by the user itself.
Hence ownership and permissions of the spool file.
Regards
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2005 01:01 AM
тАО09-15-2005 01:01 AM
SolutionYou can do that from sqlplus, after spool off, with
sql> spool off
sql> !chmod 755 your_file_name
Patti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2005 03:17 PM
тАО09-15-2005 03:17 PM
Re: Spooled output from sqlplus "File permission Problem"
Thank's guys for the effort in resolving my concern especially to Patti.. Your solution was the ideal work around on my problem..
thank's & best regards,
Joaquin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2005 03:29 PM
тАО09-15-2005 03:29 PM