473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

howto get permission information of UNIX directory


Hello @ all!

I'm fairly new to Java so this might be a stupid question but ... however
...
Is there any possibility to gather information about the owner of a Unix
directory
and it's permissions ?
For instance, there is a directory

drwxr----- 13 java nogroup 297 Dec 20 17:07 test
and I want to make sure that only the user "java" may access it. Otherwhise
the data stored within this directory may be corrupted.
I've had a close look at all Java related documentation I could find but
either
Java can't do this job or I simply don't see how to solve this problem.

perhaps some of you could give me a hand?
Thanks in advance,
merry x-mas!
Thorsten Garrels
Jul 17 '05 #1
1 2440
hello thorsten
i think there is canRead() , canWrite() for java.io.File class which
checks if your app can read /write ..... not sure abt execution
permission
newyas
if nothing works you can use native code to do the required stuff

regards
amey
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Seb | last post by:
Hi, I've got something strange when uploading files on a UNIX machine with PHP 4.3.4 + Apache 1.3.29 : The uploaded file is uploaded in /va/tmp with permissions 600 (that's normal) ...
4
by: Logan | last post by:
Several people asked me for the following HOWTO, so I decided to post it here (though it is still very 'alpha' and might contain many (?) mistakes; didn't test what I wrote, but wrote it - more or...
3
by: James | last post by:
Is it possible to check if you have permission to access and or change a directory or file?
2
by: Dan | last post by:
hi ng, is there a way to set a page the user gets redirected when using windows authentification (and the user gets authentificated by active directory) and authorization failed?) i have tried...
0
by: Jeremy | last post by:
I have an ASP.net application which needs to retreive images from multiple remote machines. It is reterieveing images generated by a web cam service on those machines. All of these machines,...
8
by: Topper | last post by:
Hello. I have simple web folders structure: -ROOT - BIN WebService.dll WebService.asmx I need to use my WebService.dll not in bin folder - for example, in ROOT. How do i this? How can i do...
8
by: Tom Strickland | last post by:
Hopefully this is a simple question. I've started to program in Python after an absence of about a year, so I'm very rusty. I wrote a short program and tried to run it using Python2.4 in Linux. I...
5
by: Kurda Yon | last post by:
I want to create a publicly accessible php page which will generate images (with the GD library) and store them in some directory. For this I have to change the permission of directory (it has to...
0
by: phil469 | last post by:
I'm having an issue when trying to read a file in a user's homedir from a cgi script. I have a virtual host section in my httpd.conf file which I'll include. The cgi script is a very basic script...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.