I need to create a file (in my java source code) that will be able to execute a bash script without having to have the user type chmod 755...in their terminal. I tried command files, but it still asked me to give the file permission. Thanks
I have tried command files, exe files, jar files, etc
import java.io.*;
import java.util.*;
public class twint2 {
public static void main (String [] args)throws FileNotFoundException{
File bash = new File ("/Users/garrettpartenza/Desktop/myScriptss.command");
PrintStream out = new PrintStream (new FileOutputStream(bash));
out.println("#!/bin/bash");
out.println("twint -u realDonaldTrump -s china -o /Users/garrettpartenza/Desktop/file.csv");
}
}
It downloads the command file, but it still needs permission to execute.