touch: cannot touch

Brett Himmelright

New Member
Joined
Apr 8, 2019
Messages
2
Reaction score
0
Credits
0
Hello,

I am looking for some help getting a jar file to create a PID, where I am getting touch cannot touch..no such file or directory, even though it exists and cannot create the PID file.

Any assistance is appreciated.

Thank you.

Brett
 


G'day again Brett :)

What is the actual command you are using?

Do you have permissions on the folder where the file is to be created?

Wizard
 
I have attempted to add permissions chmod 777 myfile but i am still getting the error. Here are the commands and results.. Thanks Wizard.


controlroom$ ./cr start
touch: cannot touch '/home/cr/controlroom/crserver.pid': No such file or directorycat: /home/cr/controlroom/crserver.pid: No such file or directory
./cr: 45: ./cr: cannot create /home/cr/controlroom/crserver.pid: Directory nonexistentStarting ControlRoom: ./cr: 71: ./cr: cannot create /home/cr/controlroom/log/viasys.log: Directory nonexistent
touch: cannot touch '/home/cr/controlroom/crserver.pid': No such file or directory./cr: 37: ./cr: cannot create /home/cr/controlroom/crserver.pid: Directory nonexistent
error.
controlroom$ ./cr r
Error: Unable to access jarfile /home/cr/controlroom/crserver.jar
 
Last edited:
Humour me, as scripting is not my forte (multi-multi-multi-booting is, lol)

1. Is start the name of a script?
2. ./cr is an abbbreviation of control room. and it is in here that the script "start" is housed?

What does the script do (if working) - contents would be good.

If the script is actually named start, that is not a good idea, as there is already a command start

See

Code:
man start

Other than that, we can call in the scripting gurus :)

Cheers

Wiz
 
OK - without knowing what the cr script is - lets take a look at the error messages:
controlroom$ ./cr start
touch: cannot touch '/home/cr/controlroom/crserver.pid': No such file or directorycat: /home/cr/controlroom/crserver.pid: No such file or directory
./cr: 45: ./cr: cannot create /home/cr/controlroom/crserver.pid: Directory nonexistentStarting ControlRoom: ./cr: 71: ./cr: cannot create /home/cr/controlroom/log/viasys.log: Directory nonexistent
touch: cannot touch '/home/cr/controlroom/crserver.pid': No such file or directory./cr: 37: ./cr: cannot create /home/cr/controlroom/crserver.pid: Directory nonexistent
error.
controlroom$ ./cr r
Error: Unable to access jarfile /home/cr/controlroom/crserver.jar

We're seeing a lot of error messages regarding creating files and directories. So this looks like a permissions related thing. The ./cr script seems to be creating files in the home dir of a user called cr. Is cr the user-name you are logged in as when running this script?
If you are logged in as cr - I'm at a loss to explain without knowing a lot more about the layout of the file-system, the permissions and exactly what this ./cr script is and what it does.

But if you are NOT logged in as a user called cr - that would explain the errors somewhat, because /home is owned by root. Without root access, the ./cr script would be unable to create a cr directory in /home/, or any of the sub-directories. So perhaps running the ./cr script as root? IDK!

We need more information. Is this script something you have created yourself? Or something you have downloaded from somewhere? If this isn't a problem with the permissions, then it is almost certainly a bug in the ./cr script itself. That would be my best guess!
 

Members online


Top