Unix File has 000 access when written


 
Thread Tools Search this Thread
Top Forums Programming Unix File has 000 access when written
# 1  
Old 08-31-2009
Unix File has 000 access when written

Good day!

I would just like to ask about an issue I encountered. There is a Java program (version1.3) that we use that is hosted in Unix (HP-UX B.11.11 U), and one of its functions copies a file and writes it to another directory. It usually runs fine, but one day, it wrote a file that had 000 access on it. As far as I know, this happened only once ever in the whole run of the system. This caused a lot of problems because the file couldn't be read or deleted.

Do you guys have any idea how the file could have been written with such an access? Aside from someone playing a really bad joke and running chmod on it? Smilie
# 2  
Old 09-01-2009
Assuming the process works like others - someone set umask 777 and ran the code.
# 3  
Old 09-01-2009
Quote:
Originally Posted by mike_s_6
This caused a lot of problems because the file couldn't be read or deleted.
Deleting should still have worked, that is controlled by directory permissions:
Code:
tyler@mecgentoo ~ $ mkdir asdf
tyler@mecgentoo ~ $ cd asdf
tyler@mecgentoo ~/asdf $ touch this
tyler@mecgentoo ~/asdf $ chmod 000 this
tyler@mecgentoo ~/asdf $ ls -l
total 0
---------- 1 tyler users 0 Sep  1 12:17 this
tyler@mecgentoo ~/asdf $ rm this
rm: remove write-protected regular empty file `this'? y
tyler@mecgentoo ~/asdf $

So check the ownership and permissions of the directory.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

Can Unix access Windows' File through Command Prompt in Unix

Hi all, I wish to know whether Unix can access window's file in Unix's terminal? Apart from that, how to copy files or share files between Window and Unix? I get to know of secure copy, however, my company's Unix does not support the feature of secure copy? Any other method for me to share/... (5 Replies)
Discussion started by: jessy83
5 Replies

2. UNIX for Dummies Questions & Answers

Unix File Access Right

Hi all, I am curious what does this mean for? My file access right is denoted as xxx xxx xxx +, what does the + sign mean? As I am having + sign in file access, I am not able to copy the file that is having + sign. Thanks. (13 Replies)
Discussion started by: jessy83
13 Replies

3. Shell Programming and Scripting

file access in unix..please help

Hi im using solaris. In ma unix system i had a perl file called cleanup.pl which deleted all my files in my system.Is there a way to know when this file was accessed( rather executed ) and by which user ???? basically i wan to know a way to know which user had accessed( or run the particular perl... (1 Reply)
Discussion started by: Anuj8584
1 Replies

4. UNIX for Dummies Questions & Answers

can a korn shell script be written on HP-UNIX?

Is HP UNIX and Korn different flavours of unix? can a korn shell script be written on HP Unix? (4 Replies)
Discussion started by: soujanya_srk
4 Replies

5. Shell Programming and Scripting

Compiling scripts written in Unix

I would like to convert some Unix scripts into machine language. I dont know how to programe in C. Is there any software out there that I can use to convert these Unix scripts into machine language. Thanks. (1 Reply)
Discussion started by: coburn
1 Replies

6. News, Links, Events and Announcements

Microsoft "Donates" $3,000,000,000 to Feds

Surreal quote from the news link below: http://www.washingtonpost.com/wp-dyn/articles/A44615-2002Nov12.html (0 Replies)
Discussion started by: Neo
0 Replies

7. UNIX for Advanced & Expert Users

Porting of Windows written unix scripts to unix platform

Can anybody help me in finding out a solution for the problem below? When we write .unix or .sh files in windows OS and port them to Unix platforms there is a character ^M inserted at the end of each line of the script file. During ftp porting I set the transfer mode as ASCII for the script... (7 Replies)
Discussion started by: tamilselvi
7 Replies
Login or Register to Ask a Question