How to use .netrc when running MKS Toolkit on Windows? - ftp

I am moving an application from Unix (AIX) to Windows. We have MKS Toolkit on the Windows server in order to run our shell scripts fairly unchanged. However, my old FTP jobs depend on the .netrc file. Can anybody tell me whether .netrc is supported under MKS Toolkit, and if yes, where to put the file?

http://www.mkssoftware.com/docs/man4/netrc.4.asp :
The .netrc file is a text file residing in your home directory [...]
http://www.mkssoftware.com/docs/man1/bsdftp.1.asp
If auto-login is enabled, bsdftp checks the .netrc file in the user's home directory [...]

Related

Location of ~/.git-credentials file in Windows 10?

I searched but couldn't find the path of ~/.git-credentials in my Windows 10 machine. git documentation says that it stores username and password in plain-text in ~/.git-credentials. I want to verify it by opening the file manually.
On windows 10, git user credentials are now stored with the Credential Manager.
It is located at %UserProfile%\.git-credentials, which corresponds to C:\Users\<username>\.git-credentials (unless you've modified the registry to move your user's profile directory elsewhere).
Generally, ~ refes to the user's home directory on Linux, and many cross-platform tools which store data in ~ on Linux (including git) store their data in the user's home directory on Windows as well.

Silent installation of git through use of .bat file on Windows

I am currently working on a Windows batch file that will allow me to silently install git (the executable for which will be placed in the folder that the .bat file will be running from) in a pre-specified location on the file system.
I've found this article which seems to provide some suitable advice:
https://github.com/msysgit/msysgit/wiki/Silent-or-Unattended-Installation
However, I'm not entirely sure what parameters I would need to mention in my LOADINF file. I would like to pre-define the options that the user would manually select throughout the various stages of installation, so that it can run through from start to finish without prompting anything from the user.
Can anyone help or point me to a place where I can find these parameters and their available values?
Create a file, for eg. my-config.cnf (or my-config.ini) with the following content:
[Setup]
Lang=default
Dir=C:\Program Files (x86)\Git
Group=Git
NoIcons=0
SetupType=default
...
<other options as shown in the msysgit wiki>
Now, in the batch file, when you execute the installation file (say msysgit-install.exe), use /LOADINF as follows:
msysgit-install.exe /SILENT /LOADINF="my-config.cnf"

Debian FTP user permissions

I'm new to Linux and it's command line and I need to change user rights on FTP server. The situation is like this:
I have a Debian server (without GUI, only with command line) with FTP server. And I have 2 users. Root (all access) and webmaster (limited user). Webmaster can upload files via FTP, but these get permission 600 (chmod 0600). But I need 0777.
How or where can I change this? I can log in as the root but I don't know how to manage FTP users.
I probably need to change "umask" for webmaster. I don't know what FTP software is my Linux using. I found file etc/login.defs with value #UMASK 022, but it is commented.
Can anyone help please? Explanatory link for beginners would be enought.
This depends on which package you use to provide your ftp server program.
With some programs you can specify a default umask on the daemon's command line.
With vsftpd you can specify it in /etc/vsftpd.conf. Here's a snippet from the default config file:
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
I think clients can also change their umask from the default from within an ftp shell.

error when i want to save java file in jdk/bin

when i save java file error is you dont have permission to save in this location contact the administrator to obtain permission on window7
Don't store application data in the "Program Files" directory.
It is very bad design and regular users don't have write access to that directory (for a very good reason).
So even if you changed your settings locally to open up the door for viruses your application won't run on other computers.
Besides: storing a Java file in the JDK directory serves no purpose at all.
Btw: your uppercase letters are broken, as well as the dot or the comma...
That's normal - jdk/bin is the installation directory of the JDK, regular users cannot (and should not) write files there. You'll have the same problem on Linux/Unix and on Mac OS X, where installation directories are off-limits to regular users.
Write your files to the users home directory (System property "user.home", works across platforms), or let the user choose where you save stuff.
Bin directory do not allow directly to save program in it.
it is so simple, just save your .java file on desktop and then copy paste it in Bin. done ;)
If the file can't save directly to c:\program files\java\jdk1.8.0\bin\
Solution:-
Click start Menu type Notepad command in run run as administrator
Right click the Notepad run as Administrator, then type the program file can save directly to c:\program files\java\jdk1.8.0\bin\
Just try it......

Remove execute permission on file downloaded on a Mac

We have a web app running on a Windows server, which allows a user to do some processing and download the results. The result is a set of files which are dynamically created on the server and zipped into a single file for facilitating the download process.
Everything works fine on Windows, but when users download the file from the web app on a Mac, the contents of the zip file have the execute (chmod +x) permission set (I presume that the same happens on *NIX and Linux machines). This can, of course, be removed by running the 'chmod -x' command, but is there a way by which one can remove the execute permission on the files, so that when downloaded on a Mac, the files don't have the execute permission set by default?
I believe it's not possible - .zip files don't contain permissions, so on a Mac it has to default to "most permissive" (otherwise it's possible that there are applications inside the zip that wouldn't be marked as executable when they need to be).
tars, for instance, do record permissions, but that'd be a bit more difficult to create on a Windows server.

Resources