Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I hope this is a Linux problem, it's a bit mixed. I'm trying to write an output file from a fortran program to another machine on a network so that I can plot the output on one machine, file by file, as the other machine crunches the numbers. One of the machines has W7, the others are Suse 13.1. I am constrained to use the W7 machine for the plots because the linux machines don't run the legacy plot programs I need. So far I can write to a file and pick the data up provided only that its W7 to W7 or linux to linux, in either case the file being on the same output and read machine. I can copy files complete, one by one, across the network manually by drag and drop but I want the output to go straight to another machine as it is generated. It looks to me, the usual Samba problems notwithstanding, that the network is ok as such, w7 and Linux happily integrated etc.
My question then is
None of the combinations of hostnames/filenames seem to work as intended. So e.g. the W7 machine (hostname slave2) filename testfile.dat is written to a folder with”Computer Local Disk Users user Desktop Transfer” across the top and a second program on the W7 can read the data from there. So the W7 machine to this folder works. Ditto the linux version (on machine hostname slave 5) using “file1='/usr/local/lf9561/examples/fortran/Rescued/inputoutput/testfile.dat' works within the linux machine.
But when I change the filename in the linux version to “smb:/slave 2/Computer/Local Disk... etc. it doesn't work. I've tried all the combinations of these titles I can think of and also cifs and a password file but still nix. I think the problem there may be related to the fact that Samba allows access to the Home folder whereas Transfer is written to the Root. I'm very much a networking beginner so I'd be really grateful if someone could just tell me which hostname/filenames to use? I realize that it looks as if I'm going the wrong way, W7 to Linux, whereas eventually I want to transfer in the other direction, but I'm not too bothered by that at the moment. Many thanks, Adrian
Thanks for the reply. The W7 machine can see and access files on all the linux machines. The linux machine I want to work with (slave 5) can see slave 2 (the W7 machine) (I haven't settled all the samba passwords yet, some of the other machines can see each other immediately, some need a password, some can only see some others) The homegroup is as far as I can tell by-passed, so I can drag, drop files around and open them subject to these limitations easily enough. The machines (slave 2, slave 5) I want to use are quite happy to communicate at this level. It's the actual titles of the files I need to start with. At the moment I can't unravel how to line the files up, what do I need to call the files in the programs. The W7 fortran program saves correctly to "c:\Users\user\Desktop\Transfer\testfile.dat". The linux program which should read it is set to interrogate "smb:slave2\Users\user\Desktop\Transfer/testfile.dat". What should I call this file? As I say for each machine test programs to read these data are happy on that machine. It's the connecting that's the problem. Here are the other programs I think I need:
To "line up" the directory share name for c:\Users\user\Desktop\Transfer\ should match the share name in the fstab file (//server/Transfer) I assume it is Transfer.
The fstab entry should be:
//slave2/Transfer /root/usr/lf9561/examples/fortran/Rescued/inputoutput cifs ...
//slave2_IP_address/Transfer /root/usr/lf9561/examples/fortran/Rescued/inputoutput cifs ...
The smb:// is just valid in the linux file browser to access windows PC shares. Typically unless you have slave2's IP address in the /etc/hosts file linux will not find it without using its IP address if not using a local DNS. If slave2 does not have a static address then I suggest setting up a reserved address in your router. Might need to provide more information on your network configuration.
The linux program should read the file from /root/usr/lf9561/examples/fortran/Rescued/inputoutput/testfile.dat However, the program needs to be run as root to access the file /root directory.
I tidied the W7 program, so Testfile.dat is now in Transfer there. It's also visible on all the linux machines, can be opened and examined. It still can't be read by the fortran program though (using 'file1='/usr/local/lf9561/examples/fortran/Rescued/inputoutput/testfile.dat'). Using 'slave2' in fstab has so far returned 'No such file or directory (open, errno=2, unit= 5)' but after changing to '192.168.0.9' it now returns 'Permission denied (open, errno=13, unit= 5)' or hangs.
I notice that the lefthand column in Dolphin shows the IP method and allows me to open it, but won't allow access via the hostname method.
Hope this is correct - fstab mounts peripherals etc?
slave5:/usr/local/lf9561/examples/fortran/Rescued/inputoutput # mount //192.168.0.9/Transfer /usr/local/lf9561/examples/fortran/Rescued/inputoutput
Password for root@//192.168.0.9/Transfer: ********
Not sure what to leave out, so I cut everything, statement by statement from the right. Each step until this one gave me the mount help/man file. Since this seemed ok, I tried the compiled fortran file:
slave5:/usr/local/lf9561/examples/fortran/Rescued/inputoutput # ./a.out
Permission denied (open, errno=13, unit= 5).
Error occurs at or near line 6 of MAIN__
Sorry to bother you with another post before you've digested the last. I think that the previous failure may be due to the absence of an a.out file - when I looked at folder inputoutput it seemed to have the data file and no program file. I don't know how that happened. When I recopied them from a USB and recompiled and exec'd, the program hung. Nothing at all. The mount was still in operation so I unmounted and tried again, same result. I also notice that when I open inputoutput via dolphin the header label says "Transfer on 192.168.0.9" rather than "inputoutput" seemingly whether it is mounted or not.