Is a file (or directory) writeable?
I am using Visual Studio 2010 and am trying to find the answer to a very simple question (I thought). Given the path of a file or a directory, is the user allowed to overwrite the file or write into the directory?
I coded the following:
FileInfo fsi = new FileInfo(filename);
FileAttributes attrs = fsi.Attributes;
if ((attrs & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
XmlStore.LoadFailureMessage = filename + " is readonly, not supported";
return false;
but it did not work when I specified a File in the drive C root directory for an unprivileged user. Yet if I attempted to write into that directory I got a message that I did not have permission.
Am I doing something stupid? Thanks in advance for any help.
Michael Bate
The only reliable way to test whether a file is readable is try to open a write handle to the file. There is no other reliable way because there are so many reasons that can block you from writing to it. (File permissions, attributes, share permission,
existing opened handle that does not enable shared-write, etc.)
In your case, you've hit by something known as "only process that run as SYSTEM and TRUSTEDINSTALLER can write to directory owned by TRUSTEDINSTALLER" problem that exist on Vista+. Please try to write to
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) instead.
Similar Messages
-
Bursting Problem - A file or directory in the path name does not exist
I'm trying to burst some data via email using the standard DocumentProcessor java code but receiving an error relating, I assume, to an invalid temporary directory. I've checked that the directory exists, as do the data file and control file. By the way I am not running in Apps, just stand alone mode. Any ideas would be much appreciated.
[042308_104249440][oracle.apps.xdo.batch.bursting.FileHandler][EXCEPTION] java.io.FileNotFoundException: /u02/DIAS/bursting/BIPublisher/tmp/042308_104249338/xdo2.tmp (A file or directory in the path name does not exist.)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:205)
at java.io.FileOutputStream.<init>(FileOutputStream.java:96)
at oracle.apps.xdo.template.RTFProcessor.setOutput(Unknown Source)
at oracle.apps.xdo.batch.bursting.FileHandler.rtf2xsl(Unknown Source)
at oracle.apps.xdo.batch.bursting.ProcessDocument.getXSLFile(Unknown Source)
at oracle.apps.xdo.batch.bursting.ProcessDocument.processTemplate(Unknown Source)
at oracle.apps.xdo.batch.bursting.ProcessCoreDocument.processLayout(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.addDocument2Queue(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.createBurstingDocument(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.burstDocument(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.globalDataEndElement(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.endElement(Unknown Source)
at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201)
at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingRequest(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingEndElement(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.endElement(Unknown Source)
at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201)
at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingConfigParser(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.process(Unknown Source)
at oracle.apps.xdo.batch.DocumentProcessor.process(Unknown Source)
at PIreportburst.bEngine(PIreportburst.java:24)
at PIreportburst.main(PIreportburst.java:51)
-Below is the java code I'm using
public void bEngine(String ctrlFile, String dataFile, String tmpDir) {
try {
DocumentProcessor dp = new DocumentProcessor(ctrlFile,dataFile,tmpDir);
dp.process();
catch (Exception e) {
System.out.println(e);
}Thanks Ike
Where do you suggest setting the temp directory:
DocumentProcessor("control.xml","data.xml","/u02/DIAS/bursting/BIPublisher/tmp/042308_104249338/xdo2.tmp")
or in the xdo.cfg:
<property name="system-temp-dir">/u02/DIAS/bursting/BIPublisher/tmp/042308_104249338/xdo2.tmp</property>
..and thanks for the link to the BIPublisherIDE
Cheers, Mike -
Brand new Mac Book Pro
Purchased in Mexico's Department store Liverpool on June 20th 2012
Purchased Memory upgade to 8Gb, on june 27th, at Apple Store Memorial City, Houston
Upgraded memory from 4Gb to 8Gb on June 28th.
Tried to write on my external HD (previously written on a windows based PC) with no success.
Upon reccomendation from a Mac assistant, copied all my external HD contents into my Mac Hard drive.
Then formatted my external HD and copied back all my information to it.
deleted all the information from my MacBook Pro HD.
Attempted to repeat the same operation with another external HD, but got a message saying there was not enough epace on the computer HD (even though I have a 750Gb Hard Drive.
Looked in the trash bin and there it was, all the information previously deleted..
Could not empty the trash bin, although I got a message asking me to safely delete all the information from the trash bin,
Could not get enough space released, after several attpempts the trash bin was finally emptied.
All happy getting acquainted with my new MacBook Pro. Two days later, got a gray screen and not able to start the computer.
Looking in to Mac support I found article http://support.apple.com/kb/TS2570 and followed instructions to perform a safe boot:
"Perform a Safe Boot
Simply performing the Safe Boot may resolve this issue.
Shut down your Mac. If necessary, hold your Mac's power button for several seconds to force it to power down.
Start your Mac, then immediately hold the Shift key. This performs a Safe Boot. Advanced tip: If you want to
see the status of a Safe Boot as it progresses, you can hold Shift-Command-V during start up (instead of just Shift).
Note: A Safe Boot takes longer than a typical start up because it includes a disk check and other operations.
The following is the script that appears on the screen upon safe boot. and halt after the last line.
AppleACPICPU:Processor Id=6 LocalAplicId=255 Disabled
AppleACPICPU:Processor Id=7 LocalAplicId=255 Disabled
AppleACPICPU:Processor Id=8 LocalAplicId=255 Disabled
calling mpo_policy_init for TMSafetyNet
Security policy loaded: Safety net for Time Machine (TMSafetyNet)
calling mpo_policy_init for Sandbox
Security policy loaded: Seatbelt sandbox policy (Sandbox)
calling mpo_policy_init for Quarantine
Security policy loaded: Quarantine Policy (Quarantine)
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All Rights Reserved.
MAC Framework Succesfully initializad
using 16384 buffer headers and 10240 cluster IO buffer headers
IOAPIC: Version 0x20 Vextors 64:87
ACPI: System State [SO S3 S4 S5] (S3)
PFM64 (36cpu) 0xf10000000, 0xf0000000
Aplconsole relocated to 0xf1000000
PCI configuration changed (bridge=16 device=4 cardbus=0)
[ PCI configuration end, bridges 12 devices 16 ]
Firewire (OHCI) Lucent ID 5901 built-in now active, GUID 3c0754fffe9b2aa2; max speed s800.
Pthread support ABORTS when sync kernel primitives misused
com.apple.AppleFSCompressionTypeZlib kmod start
com.apple.AppleFSCompressionTypeDataless kmod start
com.apple.AppleFSCompressionTypeZlib load succeeded
com.apple.AppleFSCompressionTypeDateless load succeeded
AppleIntelCPUPowerManagementClient: ready
BTCOEXIST off
wl0: Broadcom BCM4331 802.11 Wireless controller
5.100.98.75
AppleUSBMultitouchDriver::checkStatus - received Status Packet, Payload 2: device was reinitializad
rooting via boot-uuid from /chosen: 6E918706-FC0D-37460-A3A0-6268A51DF93B
Waiting on <dict ID="0"><key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
Got boot device = IOService:/AppleACPIPlatformExpert/PCI0@0/AppleAPIPCI/SATA@1F,2/AppleIntelPchSe riesAHCI/PRT0@0/AOAHCIDevice@0/AppleAHCIDiskDriver/IOAHCIBlock
storageevice /IoBlockStorageDriver/TOSHIBA MK7559GSXF Media/IOGUIDPartit
BSD root: disk0s2, major 14, minor 2
Kernel is LP64
com.apple.launchd 1 com.apple.launchd 1 *** launchd[1] has started up. ***
com.apple.launchd 1 com.apple.launchd 1 *** Verbose boot, will log to /dev/console. ***
Running fsck on the boot volume...
** /dev/rdisk0s2 (NO WRITE)
** Root file system
Executing FSCK_HFS (version diskdev_cmds-540.1~25).
BootCacheControl: UNable to open /Var/db/BootCache.playlist:2 No such file or directory
launchctl:Dubious permissions on file (skipping): /Library/LaunchDaemons
launchctl:Dubious permissions on file (skipping): /System/Library/LaunchDaemons
Any help or suggestions on what to do next would be welcomed.
I am in the middle of the Atlantick, stuck with a brand new, non working Apple MacBook Pro.
Best regards
Sergio RamosReinstalling MacOS does NOT fix the problem for me. I'm still searching a solution !
Bernard -
Need Help: Have to route file from directory to directory in same system
Hi Experts,
I need to route xml file from one directory to another and then to another one in the local system. For example, i have the file in directory A, i need to delete that file from that location and place it in B and then from B i have to move it to A again and then move it to C.
The path will be: A-> B -> A -> C
where A, B, C are folder names
How can i do that in SAP-XI in ID? Do i need to create two communication channels? Please guide me and help me out of this.Hi Arkesh,
>>For example, i have the file in directory A, i need to delete that file from that location and place it in B and then from B i have to move it to A again and then move it to C.
For doing this why you need SAP PI? you can better do this with a script or batch job.
>>A-> B -> A -> C
A to B will be one interface and B-->A will be another one. The file getting picked from A and getting dropped to A (in second scenrio) shoudl not have the same name else these two interfaces will go in a loop.
A to C will be the third scenario
each scenario will have a sender file adapter and a receiver file adapter.
But still I didn't get the business usage or usage of PI in this case
Regards
Suraj -
How to delete a READ ONLY file from Directory
Hi Friends,
how to delete a READ ONLY file from Directory , file is in my system only.
Please help me .
note: its read only file.
Thank you.
Karthik.hI,
try with this statement.
delete dataset <datasetname>.
this will definitely work.
Regards,
Nagaraj -
Searching file from directory located at http path.
Hi All,
I have made the program to search for a file in a directory and its subdirectories. This is working fine when my directory is located on local machine. But if the same directory is placed in HTTP path, the code fails to search a directory. Does anyone has idea how can i connect to site so as to access the directories. I used URL and URLConnection to read and write file to the site, and this is also working fine but when it comes to directories i find no solution. Please help.This works fine if i map http://flash/ on my C: and
try to list files in directory C:\Mojo. Can you please
tell how can i know whether the http server i am
trying to access allows directory listing or not.
Because if it does not i have administrator rights on
the server and i can make the changes required.You can see if your Web server allows directory listing by simply
typing in the URL you want to examine, inside your browser, and see if
it shows you a directory listing. For instance, if you type in:
http://flash/Mojo/
in your browser's address bar, and you see a list of files in that
directory, then your Web server supports directory listing.
Note, though, that you can't use the File list() method to get a list of files.
You'll have to make a connection, read the input stream, and then parse
the filenames out of the HTML that the Web server returns. (You can see
what the HTML looks like, by doing View Source inside your brower. That's
what you'll get back from your Java program.)
--Steve -
Read file from directory, update contents of the each file
hai,
I could not understand how to debug the error i have now.
target
1- read the files from directory // i able ot do this part
2- for each file
for each file read the content & compare with the existing List & update the list // i able to do this part
when i try to combine both parts , i got some following error
run:
E:\java\check\100130.ixf
Error: children[i] (The system cannot find the file specified)
BUILD SUCCESSFUL (total time: 2 seconds)
i can see from the code that children[i] only gives the error when i use that in the second part of the code.
can any one help me on this??
Thanks
Priyan
the original code
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.io.RandomAccessFile;
import java.util.ArrayList;
public class CompareList
public static void main(String[] args){
ArrayList a1 = new ArrayList();
ArrayList a2 = new ArrayList();
a1.add("1");
a1.add("2");
a1.add("3");
a1.add("4");
a1.add("5");
a1.add("6");
a1.add("7");
a1.add("8");
a1.add("9");
a1.add("10");
a1.add("11");
a1.add("12");
a1.add("13");
a1.add("14");
a1.add("15");
a1.add("16");
a1.add("17");
a1.add("18");
a1.add("19");
a1.add("20");
a1.add("21");
a1.add("22");
a1.add("23");
a1.add("24");
a1.add("25");
a1.add("26");
a1.add("27");
a1.add("28");
a1.add("29");
a1.add("30");
a1.add("31");
a1.add("32");
a1.add("33");
a1.add("34");
a1.add("35");
a1.add("36");
a1.add("37");
a1.add("38");
a1.add("39");
a1.add("40");
a1.add("41");
a1.add("42");
a1.add("43");
a1.add("44");
a1.add("45");
a1.add("46");
a1.add("47");
a1.add("48");
a1.add("49");
a1.add("50");
a1.add("51");
a1.add("52");
try{
File dir = new File("E:\\java\\check");
File[] children = dir.listFiles();
if (children == null) {
System.out.println("does not exist or is not a directory");
else {
for (int i = 0; i < children.length; i++) {
System.out.println( children);
FileInputStream fstream = new FileInputStream("children[i]");
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String strLine;
while ((strLine = br.readLine()) != null) {
String line =strLine.substring(0,2);
// Print the content on the console
//System.out.println(line);
a2.add(line);
} // end of add list2
if (a1.size() > a2.size())
int k = 0;
for (int l = 0; l < a2.size(); l++)
if (!((String)a1.get(l)).equals((String)a2.get(l)))
//System.out.println((String)a2.get(i));
// System.out.println("dd");
k = l;
k++;
for (int l = k; l < a1.size(); l++)
System.out.println((String)a1.get(l));
String str = "children[l]";
File file = new File(str);
RandomAccessFile rand = new RandomAccessFile(file,"rw");
rand.seek(file.length()); //Seek to end of file
rand.writeBytes((String)a1.get(i)); //Write end of file
rand.writeBytes("., 0.");
rand.writeBytes("\n");
}// end of comparing and updating the list2
in.close();
catch (Exception e){//Catch exception if any
System.err.println("Error: " + e.getMessage());thanks for the information.
i tried, the error
like this
run:
E:\java\check\100130.ixf
java.lang.StringIndexOutOfBoundsException: String index out of range: 2
at java.lang.String.substring(String.java:1935)
at CompareList.main(CompareList.java:84)
BUILD SUCCESSFUL (total time: 0 seconds)this comes because in my code i used children[i] as string in the later part
else {
for (int i = 0; i < children.length; i++) {
System.out.println( children);
FileInputStream fstream = new FileInputStream(children[i]);
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String strLine;
while ((strLine = br.readLine()) != null) {
String line =strLine.substring(0,2);
a2.add(line);
System.out.println(line);
} // end of add list2
if (a1.size() > a2.size())
int k = 0;
for (int l = 0; l < a2.size(); l++)
if (!((String)a1.get(l)).equals((String)a2.get(l)))
//System.out.println((String)a2.get(i));
// System.out.println("dd");
k = l;
k++;
for (int l = k; l < a1.size(); l++)
System.out.println((String)a1.get(l));
String str = "children[l]";
File file = new File(str);
RandomAccessFile rand = new RandomAccessFile(file,"rw");
rand.seek(file.length()); //Seek to end of file
rand.writeBytes((String)a1.get(i)); //Write end of file
rand.writeBytes("., 0.");
rand.writeBytes("\n");
rand.close();
}// end of comparing and updating the list2
in.close();
i stil could not figure out it yet. do u have any clue with this. -
Getting `No such file or directory` error while trying to open bdb database
I have four multi-threaded processes (2 writer and 2 reader processes), which make use of Berkeley DB transactional data store. I have multiple environments and the associated database files and log files are located in separate directories (please refer to the DB_CONFIG below). When all these four processes start to perform open and close of databases in the environments very quickly, one of the reader process is throwing a No such file or directory error even though the file actually exists.
I am making use of Berkeley DB 4.7.25 for testing out these applications.
The four application names are as follows:
Writer 1
Writer 2
Reader 1
Reader 2
The application description is as follows:
‘*Writer 1*’ owns 8 environments and each environment having 123 Berkeley databases created using HASH access method. At any point of time, ‘*Writer 1*’ will be acting on 24 database files across 8 environments (3 database files per environment) for carrying out write operation. Where as reader process will be accessing all 123 database files / per environment (Total = 123 * 8 environments = 984 database files) for read activities. Similar configuration for Writer 2 as well – 8 separate environments and so on.
Writer 1, Reader 1 and Reader 2 processes share the environments created by Writer 1
Writer 2 and Reader 2 processes share the environments created by Writer 2
My DB_CONFIG file is configured as follows
set_cachesize 0 104857600 1 # 100 MB
set_lg_bsize 2097152 # 2 MB
set_data_dir ../../vol1/data/
set_lg_dir ../../vol31/logs/SUBID/
set_lk_max_locks 1500
set_lk_max_lockers 1500
set_lk_max_objects 1500
set_flags db_auto_commit
set_tx_max 200
mutex_set_increment 7500
Has anyone come across this problem before or is it something to do with the configuration?Hi Michael,
I should have included about how we are making use of DB_TRUNCATE flag in my previous reply itself. Sorry for that.
From writers, DB truncation happens periodically. During truncate (DB handle is not associated with any environment handle i.e. stand-alone DB
) following parameters are passed to db->open function call:
DB->open(DB *db,
DB_TXN *txnid, => NULL
const char *file, => file name (absolute DB file path)
const char *database, => NULL
DBTYPE type, => DB_HASH
u_int32_t flags, => DB_READ_UNCOMMITTED | DB_TRUNCATE | DB_CREATE | DB_THREAD
int mode); => 0
Also, DB_DUP flag is set.
As you have rightly pointed out, `No such file or directory` is occuring during truncation.
While a database is being truncated it will not be found by others trying to open it. We simulated this by stopping the writer process (responsible for truncation) and by opening & closing the databases repeatedly via readers. The reader process did not crash. When readers and writers were run simultaneously, we got `No such file or directory` error.Is there any solution to tackle this problem (because in our case writers and readers are run independently. So readers won't come to know about truncation from writers)?
Also, we are facing one more issue related to DB_TRUNCATE. Consider the following scenario:
<ul><li>Reader process holds reference of database (X) handle in environment 'Y' at time t1
</li>
<li>Writer process opens the database (X) in DB_TRUNCATE mode at time t2 (where t2 > t1)</li>
<li>After truncation, writer process closes the database and joins the environment 'Y'</li>
<li>After this any writes to database X is not visible to the reader process</li>
<li>Once reader process closes the database X and re-joins the environment, all the records inserted from writer process are visible</li>
</ul>
Is it the right behavior? If yes, how to make any writes visible to a reader process without closing and re-opening the database in the above-mentioned scenario?
Also, when [db_set_errfile|http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/db_set_errfile.html] was set, we did not get any additional information in the error file.
Thanks,
Magesh -
Dear All,
I am able to schedule the Crystal report successfully means mail gets auto triggered as we set in SCHEDULE option. But when we tried to use the notification option we get the status as FAILED. nd in details we get "source file error. [No such file or directory]: [CrystalEnterprise.Smtp]".
But still a mail gets triggred and each and every person will get mail. but the issue is notification will not work properly and no notification mail. And the status is despayed as FAILED with "source file error. [No such file or directory]: [CrystalEnterprise.Smtp]" this message.
Regards,
Rohan GhadiDo you have multiple job servers in your environment? Did all the Job servers configured SMTP settings?
-
"No such file or directory" errors on Time Machine backup volume
I remotely mounted the Time Machine backup volume onto another Mac and was looking around it in a Terminal window and discovered what appeared to be a funny problem. If I "cd" into some folders (but not all) and do a "ls -la" command, I get a lot of "No such file or directory" errors for all the subfolders, but all the files look fine. Yet if I go log onto the Mac that has the backup volume mounted as a local volume, these errors never appear for the exact same location. Even more weird is that if I do "ls -a" everything appears normal on both systems (no error messages anyway).
It appears to be the case that the folders that have the problem are folders that Time Machine has created as "hard links" to other folders which is something that Time Machine does and is only available as of Mac OS X 10.5 and is the secret behind how it avoids using up disk space for files that are the same in the different backups.
I moved the Time Machine disk to the second Mac and mounted the volume locally onto it (the second Mac that was showing the problems), so that now the volume is local to it instead of a remote mounted volume via AFP and the problem goes away, and if I do a remote mount on the first Mac of the Time Machine volume the problem appears on the first Mac system that was OK - so basically by switching the volume the problem switches also on who shows the "no such file or directory" errors.
Because of the way the problem occurs, ie only when the volume is remote mounted, it would appear to be an issue with AFP mounted volumes that contain these "hard links" to folders.
There is utility program written by Amit Singh, the fella who wrote the "Mac OS X Internals" book, called hfsdebug (you can get it from his website if you want - just do a web search for "Mac OS X Internals hfsdebug" if you want to find it ). If you use it to get a little bit more info on what's going on, it shows a lot of details about one of the problematic folders. Here is what things look like on the first Mac (mac1) with the Time Machine locally mounted:
mac1:xxx me$ pwd
/Volumes/MyBackups/yyy/xxx
mac1:xxx me$ ls -a
. .DS_Store D2
.. Documents D3
mac1:xxx me$ ls -lai
total 48
280678 drwxr-xr-x 5 me staff 204 Jan 20 01:23 .
282780 drwxr-xr-x 12 me staff 442 Jan 17 14:03 ..
286678 -rw-r--r--@ 1 me staff 21508 Jan 19 10:43 .DS_Store
135 drwxrwxrwx 91 me staff 3944 Jan 7 02:53 Documents
729750 drwx------ 104 me staff 7378 Jan 15 14:17 D2
728506 drwx------ 19 me staff 850 Jan 14 09:19 D3
mac1:xxx me$ hfsdebug Documents/ | head
<Catalog B-Tree node = 12589 (sector 0x18837)>
path = MyBackups:/yyy/xxx/Documents
# Catalog File Record
type = file (alias, directory hard link)
indirect folder = MyBackups:/.HFS+ Private Directory Data%000d/dir_135
file ID = 728505
flags = 0000000000100010
. File has a thread record in the catalog.
. File has hardlink chain.
reserved1 = 0 (first link ID)
mac1:xxx me$ cd Documents
mac1:xxx me$ ls -a | head
.DS_Store
.localized
.parallels-vm-directory
.promptCache
ACPI
ActivityMonitor2010-12-1710p32.txt
ActivityMonitor2010-12-179pxx.txt
mac1:Documents me$ ls -lai | head
total 17720
135 drwxrwxrwx 91 me staff 3944 Jan 7 02:53 .
280678 drwxr-xr-x 5 me staff 204 Jan 20 01:23 ..
144 -rw-------@ 1 me staff 39940 Jan 15 14:27 .DS_Store
145 -rw-r--r-- 1 me staff 0 Oct 20 2008 .localized
146 drwxr-xr-x 2 me staff 68 Feb 17 2009 .parallels-vm-directory
147 -rwxr-xr-x 1 me staff 8 Mar 20 2010 .promptCache
148 drwxr-xr-x 2 me staff 136 Aug 28 2009 ACPI
151 -rw-r--r-- 1 me staff 6893 Dec 17 10:36 A.txt
152 -rw-r--r--@ 1 me staff 7717 Dec 17 10:54 A9.txt
So you can see from the first few lines of the "ls -a" command, it shows some file/folders but you can't tell which yet. The next "ls -la" command shows which names are files and folders - that there are some folders (like ACPI) and some files (like A.txt and A9.txt) and all looks normal. And the "hfsdebug" info shows some details of what is really happening in the "Documents" folder, but more about that in a bit.
And here are what a "ls -a" and "ls -al" look like for the same locations on the second Mac (mac2) where the Time Machine volume is remote mounted:
mac2:xxx me$ pwd
/Volumes/MyBackups/yyy/xxx
mac2:xxx me$ ls -a
. .DS_Store D2
.. Documents D3
mac2:xxx me$ ls -lai
total 56
280678 drwxr-xr-x 6 me staff 264 Jan 20 01:23 .
282780 drwxr-xr-x 13 me staff 398 Jan 17 14:03 ..
286678 -rw-r--r--@ 1 me staff 21508 Jan 19 10:43 .DS_Store
728505 drwxrwxrwx 116 me staff 3900 Jan 7 02:53 Documents
729750 drwx------ 217 me staff 7334 Jan 15 14:17 D2
728506 drwx------ 25 me staff 806 Jan 14 09:19 D3
mac2:xxx me$ cd Documents
mac2:Documents me$ ls -a | head
.DS_Store
.localized
.parallels-vm-directory
.promptCache
ACPI
ActivityMonitor2010-12-1710p32.txt
ActivityMonitor2010-12-179pxx.txt
mac2:Documents me$ ls -lai | head
ls: .parallels-vm-directory: No such file or directory
ls: ACPI: No such file or directory
... many more "ls: ddd: No such file or directory" error messages appear - there is a one-to-one
correspondence between the "ddd" folders and the "no such file or directory" error messages
total 17912
728505 drwxrwxrwx 116 me staff 3900 Jan 7 02:53 .
280678 drwxr-xr-x 6 me staff 264 Jan 20 01:23 ..
144 -rw-------@ 1 me staff 39940 Jan 15 14:27 .DS_Store
145 -rw-r--r-- 1 me staff 0 Oct 20 2008 .localized
147 -rwxr-xr-x 1 me staff 8 Mar 20 2010 .promptCache
151 -rw-r--r-- 1 me staff 6893 Dec 17 10:36 A.txt
152 -rw-r--r--@ 1 me staff 7717 Dec 17 10:54 A9.txt
If you look very close a hint as to what is going on is obvious - the inode for the Documents folder is 152 on the local mounted case (the first set of code above for mac1), and it's 728505 in the remote mounted case for mac2. So it appears that these "hard links" to folders have an extra level of folder that is hidden from you and that AFP fails to take into account, and that is what the "hfsdebug" shows even better as you can clearly see the REAL location of the Documents folder is in something called "/.HFS+ Private Directory Data%000d/dir_135" that is not even visible to the shell. And if you look closely in the remote mac2 case, when I did the "cd Documents" I don't go into the inode 135, but into the inode 728505 (look close at the "." entry for the "ls -la" commands on both mac1 and mac2) which is the REAL problem, but have no idea how to get AFP to follow the extra level of indirection.
Anyone have any ideas how to fix this so that "ls -l" commands don't generate these "no such file or folder" messages?
I am guessing that the issue is really something to do with AFP (Apple File Protocol) mounted remote volumes. The TimeMachine example is something that I used as an example that anyone could verify the problem. The real problem for me has nothing to do with Time Machine, but has to do with some hard links to folders that I created on another file system totally separate from the Time Machine volume. They exhibit the same problem as these Time Machine created folders, so am pretty sure the problem has nothing to do with how I created hard links to folders which is not doable normally without writing a super simple little 10 line program using the link() system call - do a "man 2 link" if you are curious how it works.
I'm well aware of the issues and the conditions when they can and can't be used and the potential hazards. I have an issue in which they are the best way to solve a problem. And after the problem was solved, is when I noticed this issue that appears to be a by-product of using them.
Do not try these hard links to folders on your own without knowing what they're for and how to use them and not use them. They can cause real problems if not used correctly. So if you decide to try them out and you loose some files or your entire drive, don't say I didn't warn you first.
Thanks ...
-BobThe problem is Mac to Mac - the volume that I'm having the issue with is not related in any way to Time Machine or to TimeCapsule. The reference to TIme Machine is just to illustrate the problem exists outside of my own personal work with hard links to folders on HFS Extended volumes (case-sensitive in this particular case in case that matters).
I'm not too excited about the idea of snooping AFP protocol to discover anything that might be learned there.
The most significant clue that I've seen so far has to do with the inode numbers for the two folders shown in the Terminal window snippets in the original post. The local mounted case uses the inode=728505 of the problematic folder which is in turn linked to the hidden original inode of 135 via the super-secret /.HFS+... folder that you can't see unless using something like the "hfsdebug" program I mentioned.
The remote mounted case uses the inode=728505 but does not make the additional jump to the inode=135 which is where lower level folders appear to be physically stored.
Hence the behavior that is seen - the local mounted case is happy and shows what would be expected and the remote mounted case shows only files contained in the problem folder but not lower-level folders or their contents.
From my little knowledge of how these inode entries really work, I think that they are some sort of linked list chain of values, so that you have to follow the entire chain to get at what you're looking for. If the chain is broken somewhere along the line or not followed correctly, things like this can happen. I think this is a case of things not being followed correctly, as if it were a broken chain problem then the local mounted case would have problems also.
But the information for this link in the chain is there (from 728505 to the magic-135) but for some reason AFP doesn't make this extra jump.
Yesterday I heard back from Apple tech support and they have confirmed this problem and say that it is a "implementation limitation" with the AFP client. I think it's a bug, but that will have to be up to Apple to decide now that it's been reported. I just finished reporting this as a bug via the Apple Bug Reporter web site -- it's bug id 8926401 if you want to keep track it.
Thanks for the insights...
-Bob -
Dear Experts,
Please note that I am facing a chllenge while confiuguring the VNCServer on the local test Server. The Local Test Sver OS Version is Redhat Enterprise Linux Server
Release 5.5 32-bit. Please review the following error message and advise me on how to fix the vncserver issue.
[root@test .vnc]# cat xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
gnome-session &
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
[root@test .vnc]# cat /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs.
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# <URL:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
# Use "-nohttpd" to prevent web-based VNC clients connecting.
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.
# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
VNCSERVERS="1:oracle"
[root@test .vnc]# ls
passwd test.oracle.co.zm:1.pid test.oracle.co.zm:3.log test.oracle.co.zm:5.pid test.oracle.co.zm:6.pid
test.oracle.co.zm:1.log test.oracle.co.zm:2.log test.oracle.co.zm:5.log test.oracle.co.zm:6.log xstartup
[root@test .vnc]# more test.oracle.co.zm:1.log
Xvnc Free Edition 4.1.2
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 70101000, The X.Org Foundation
Tue Mar 11 11:18:37 2014
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5901
vncext: Listening for HTTP connections on port 5801
vncext: created VNC server for screen 0
Could not init font path element unix/:7100, removing from list!
localuser:root being added to access control list
No profile for user 'root' found
SESSION_MANAGER=local/test.oracle.co.zm:/tmp/.ICE-unix/13603
Window manager warning: Log level 32: could not find XKB extension.
** (eggcups:13671): WARNING **: IPP request failed with status 1030
** (eggcups:13671): WARNING **: IPP request failed with status 1030
** (nm-applet:13697): WARNING **: No connections defined
Initializing nautilus-open-terminal extension
Unable to open desktop file /usr/share/applications/redhat-email.desktop for panel launcher: No such file or directory
Unable to open desktop file /usr/share/applications/openoffice.org-1.9-writer.desktop for panel launcher: No such file or directory
Unable to open desktop file /usr/share/applications/openoffice.org-1.9-impress.desktop for panel launcher: No such file or directory
Unable to open desktop file /usr/share/applications/openoffice.org-1.9-calc.desktop for panel launcher: No such file or directory
[root@test .vnc]#
Regards
Mohammed Abdul MuqeetHi,
Try these 3 solutions
1. Did you start vncserver services as:
service vncserver start
2.Check that port 5901 has not been blocked by a firewall:
# nc -vz localhost 5901
You should get a connection and a termination. If you get an error, fix the firewall.
3. service iptables stop
Hope This Helps
Regards,
-DK -
/etc/oratab (a file or directory in the path name does not exists)
Hello All,
I ma trying to create a database oracle 11g R2 on AIX 6.1.
But i am facing the below error at the beginning of the installation:
/etc/oratab (a file or directory in the path name does not exists)
Your help pls..When I am trying to run root.sh. it gives the below error:
IST76SIT:/apps/oracle/oracle11/app/product/11.2.0/db1> ./root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle11
ORACLE_HOME= /apps/oracle/oracle11/app/product/11.2.0/db1
Enter the full pathname of the local bin directory: [usr/local/bin]: /usr/local/bin
Creating /usr/local/bin directory...
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
./root.sh[14]: /apps/oracle/oracle11/app/product/11.2.0/db1/rdbms/install/rootadd_rdbms.sh: not found.
./root.sh[16]: /apps/oracle/oracle11/app/product/11.2.0/db1/rdbms/install/rootadd_filemap.sh: not found.
IST76SIT:/apps/oracle/oracle11/app/product/11.2.0/db1> -
'A file or directory doesn't exist' error during java stack update
Dear All,
I've done a fresh installation of solution manger system on IBM iseries box (OS400 & DB2 combo).
As part of post installation activity, I've updated the kernel patch, updated the ABAP stack to sp4, and am currently doing the java stack update.
I'm struck with one error. The log file shows:
Feb 23, 2012 7:54:35 PM Error: /usr/sap/SLM/SYS/global/j2eeclient/META-INF/SAP_MANIFEST.MF (A file or directory in the path name does not exist.)
Feb 23, 2012 7:54:35 PM Error: Error deploying Fileset Complete to /usr/sap/SLM/SYS/global/j2eeclient
Feb 23, 2012 7:54:35 PM Info: ***** End of File-System Deployment com.sap.engine.client *****
Feb 23, 2012 7:54:35 PM Error: Aborted: development component 'com.sap.engine.client'/'sap.com'/'SAP AG'/'7.0209.20110628100654.0000'/'1', grouped by :
Deployment was not successful
I've checked the file system and found that the directory META-INF is not present in /../../global/j2eeclient
Please suggest a solution.
Thank You.
regards,
vinHi,
This is an easy solution:
From the OS command line, do WRKLNK, go to /usr/sap/SLMS/global/j2eeclient, at the top where it shows the directory, do a copy on this. Then at the command line type MD, do F4, paste the directory name in the first line, then after j2eeclient add /META-INF'
IMportant*** Make sure the full directory name is in single quotes.*
*On the next 2 lines change INDIR to RWX. Then press enter and re-run your job. If you have any problems let me know. -
Bootcache.playlist no such file or directory, slow booting 10.7.2
Hi guys, I have this problem after updating to Lion 10.7.2 :
There are many threads addressing a similar problem, but all the fixes mentioned there did not work (deleting bootcache and checking access rights) and also
my problem is different, because my mac boots, after all. The others had bootloops or got stuck while booting.
When booting in verbose mode, the message
BootCacheControl:Unable to open /var/db/BootCache.playlist: 2 No Such file or directory
appears, but the system still boots - veery slow, though (about 2 minutes)
The next time it boots, it says no bootcache can be found and it builds a new one. After that it reboots by its own, without the bootcache.playlist error message, but still slow but with no problems whatsoever.
The next boot is as the first one I described, so I my Macbook Pro Mid 2010 is looping through those problems^^
Also, the file /var/db/BootCache.playlist is definetely existent, and has the following access rights: -rw------- (600) should not be a problem, should it?
Ah, and maybe I should mention, that I am using the full disk encryption Filevault2.
I hope somebody knows what to do with this vague information!
Thanks in advance!i wish I had the answer; would love to find out, as it is happening to my husband's make as well. His doesn't always boot up though. and then he gets "disk0s2: media is not present". Spent several hours on the phone with Apple today, and got nowhere.
-
Hi all,
I have tried to upgrade my iMac 2009 running 10.6.8, 3.06GHZ, 4GB ram machine and hit upon a grey load up screen and nothing more after the update. I have worked back through everything I could find in these forums as the bellow:
1. Completed all of the grey screen advice from Apple bar a full wipe and rebuild, but have left this as the last resort
2. Launched again from back up and reloaded Mavericks only to get the same problem
3. Tried to launch in Safe mode and the computer quits half way through the status bar and will not launch into Safe mode
4. Corrected all disk permissions in Disk Utility
5. Checked my EFI update and am running the latest version
6. Tried resetting the NVRAM but computer will not work from the keyboard shortcuts
7. Run Verbose mode where I could see the problem with loading Bootcache which produces the following script /var/db/BootCaches.playlist 2:no such file or directory
8. Created a carbon copy backup also and am now considering a full wipe
I have updated to Mac Book Airs in the last few weeks, and after the computer auto restarts the program then moves to a new processing screen where it finalises writing script, this point never happened on my iMac and after it restarted it just hung on the grey screen with the Apple logo. It is definitely in the Bootcache problem as this is one of te last processes and matches the amount of time the computer starts working before it heads into the grey hanging screen of death. This is definitely something that mavericks script alters, moves or deletes as I have seen this problem littered across the forums as well as the in ability for Safe mode now to work.
I am back up and running 10.6.8 at current and downloading a new version of Mavericks (more fool me). It could be a drive corruption but am unsure, but the computer s working well on 10.6.8 and has done for a very long time. Has anyone solved this yet, as t s driving me crazy!!!
Any Jedi's out there, I would be most indebted to you!
M-AHi all,
Well I thought I would re-post as have found a solution.
I created a bootable USB version of Mavericks using this article here which was very informative: http://www.techrepublic.com/blog/apple-in-the-enterprise/how-to-create-a-bootabl e-usb-to-install-os-x-mavericks/
I then rebooted via it, this again caused the grey screen of death as I thought it would, from reboot to reach this screen I held the Option Button. Before I did this I took a cloned copy of the hard drive and also backed-up again to Time Machine. Have over 470GB of music, photos and films, so yes was being a little over precautious.
I then rebooted and went into recovery mode (Cmd and R) and erased my hard drive.
I then rebooted once again but booted from my Mavericks USB version now with a clean hard drive, and set-up completed as expected with no problems. Its working beautifully at current but am yet to migrate files using the migration assistant, but once I have the new Mavericks version of my machine backed-up I will complete the migration, fingers crossed!
A few days of pain, but was a good learning experience. It was more difficult than it should be to created a bootable USB, but luckily I had another mac to work on and a decent back-up drive.
Hopefully helpful to others!
M-A
Maybe you are looking for
-
Insert a captivate 7 HTML 5 output in Robohelp 10
I am trying to insert a captivate 7 HTML 5 output in Robohelp 10. I tried the steps specified by adding an adobe captivate demo. I linked it to both the swf file and the index.html file. However I am getting an error, that the index.htm file is not v
-
Startup screen: bizarre patterns & flickers
I'm on my work's G5 flat screen iMac, X.3.9, 1.8ghs with 768 mb ddr sdram... Over the past week, on startup, it chimes as normal and several kinds of things happen. 1. a grey screen with a load of code, then a black square basically telling me to shu
-
Hi, I ahve created a cellRenderer so that it renders jCheckBox in the cell. However, the check boxes are intended for use by boolean values, and thats how they work best. However the problem i am having is that i want to render the boxes into cells t
-
Patriot Valkyrie 2-Bay drive to Macbook
I recently purchased a Patriot Valkyrie 2 bay NAS drive which says it's compatible with Mac. It's connected to a d-link switch and a WRT300N Linksys router. On the network the Mac can see the NAS drive, however, it has trouble connecting to it. I am
-
How to get support for research work from oracle?
sir i want to undergo a research from a univ at my city on db security and cryptography.i may require some document and psudo code of certain algorithim.how to get those from oracle? regards