CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   script Allrun doesn't work after beeing copied on another disk hard drive (https://www.cfd-online.com/Forums/openfoam-installation/106889-script-allrun-doesnt-work-after-beeing-copied-another-disk-hard-drive.html)

nakor September 11, 2012 17:14

script Allrun doesn't work after beeing copied on another disk hard drive
 
Hello,
I have a little problem with my Allrun file.

When I am in the installation folder (/opt/openfoam210/tutorial/...) everything work just fine.
If I copy it on another space in the same hard drive (/home/.../Desktop), it is still working.

But if I try to copy it on another drive (/media/data/test/) I cannot run this script anymore.

I tried to use chmod +x Allrun (Allrun.sh does not exist!) but it is not working.

Anyone can help me on this little issue ?

I think that it is more linux related than openfoam, but I am stuck.

Thanks in advance.

wyldckat September 11, 2012 17:20

Greetings Romain,

Do you know what's the format of "/media/data/test/"? NTFS or ext3 or ext4 or FAT32?

Or in other words: are you able to open the disk at "/media/data/test/" in Windows? If so, then that might be why it's not working. NTFS doesn't handle "is this executable or not" permissions.

Either way, try running the script with either one of the following commands:
Code:

bash ./Allrun
sh ./Allrun

Best regards,
Bruno

romain.h September 12, 2012 02:59

Hello Bruno,

it is a NTFS hard drive, so I will try


bash ./Allrun

sh ./Allrun
and if it is not working I will format my drive in fat32.


Thanks.

wyldckat September 12, 2012 15:16

Hi Romain,

FAT32 suffers from the same defect, namely it doesn't preserve the executable flags that Linux uses on ext2/3/4.

Honestly, all of this really depends on what you need to do:
  • If you need to be able to read the cases in Windows, then you should stay with this mode of operation, namely use "sh Allrun" whenever you want to execute scripts. The downside is that you'll need to define in "Allrun" to also call other scripts using "sh script_name".
  • If you are using a pen/drive that is used in both Linux and Windows, but only need to open cases in Linux, then you could use an ext2 partition inside a single file. You can find such a description here: Maintaining a local git repository on a portable disk image file or partition
Best regards,
Bruno


All times are GMT -4. The time now is 23:12.