FTP user with home /var/www and group www-data has no write permission to /var/www
21
Your vsftpd.conf
file should contain write_enable=YES
if you want to enable write support. From man vsftpd.conf
:
write_enable
This controls whether any FTP commands which change the filesystem are allowed or not. These commands are: STOR, DELE, RNFR, RNTO, MKD, RMD, APPE and SITE.
Default: NO
Related videos on Youtube
Author by
dennisp
Updated on September 18, 2022Comments
-
dennisp almost 2 years
I want to create a GitHub update checker which provides the version of the newest release.
public static void main(String[] args) { HttpURLConnection httpURLConnection = null; try { httpURLConnection = (HttpURLConnection) new URL("https://api.github.com/repos/MilkBowl/Vault/releases/latest").openConnection(); httpURLConnection.setRequestMethod("GET"); httpURLConnection.setRequestProperty("Content-Type", "application/json"); try (final InputStream inputStream = httpURLConnection.getInputStream(); final InputStreamReader inputStreamReader = new InputStreamReader(inputStream); final BufferedReader bufferedReader = new BufferedReader(inputStreamReader)) { } } catch (final IOException exception) { exception.printStackTrace(); } finally { if (httpURLConnection != null) { httpURLConnection.disconnect(); } } }
This is what I got so far. It returns this Json response:
https://api.github.com/repos/MilkBowl/Vault/releases/latest
Now I want to get the "tag_name". How can I do this with plain Java? I do not want to use an external library.
-
Scott Hunter almost 5 yearsThe Java API for JSON Processing isn't really "external": oracle.com/technetwork/articles/java/json-1973242.html
-
Scarabelo almost 5 yearsRegex on java can be a little confuse, you can go trough that searching for the right regex, or you can do something like this, too: yourreturn.split("tag_name")[1].split("target_commitish")[0].replace("\":","").replace("\",", "").replace(" ", "").replace("\"", "");