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

Share:
21

Related videos on Youtube

dennisp
Author by

dennisp

Updated on September 18, 2022

Comments

  • dennisp
    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
    Scott Hunter almost 5 years
    The Java API for JSON Processing isn't really "external": oracle.com/technetwork/articles/java/json-1973242.html
  • Scarabelo
    Scarabelo almost 5 years
    Regex 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("\":","").r‌​eplace("\",", "").replace(" ", "").replace("\"", "");