WinSCP .NET Assembly - Cannot Use Absolute File Path - .net-assembly

I am trying to use the WinSCP .NET assembly (V5.1.7.0) for FTP protocol but I am having difficulty with file paths on the target server.
The problem is any connection to the server (using either the WinSCP executable or the .NET assembly within my own software) seems to be routed instantly to the user's subdirectory (e.g. home/zild), but the files need to be uploaded to a different directory (e.g. home/test), for which the user has sufficient permissions (verified by performing the required operations manually through the WinSCP executable). If I try to set the remote path to home/test/ or /home/test/ (the absolute path) it actually uses a relative path (e.g. home/zild/home/test) in both cases. I thought the .NET assembly only ever used absolute paths, so this is a surprise. Unfortunately I cannot find a way to set the path to the desired location (home/test).
Can somebody please explain what I am doing wrong here? I have tried searching the documentation and WinSCP forums already but remain stuck.
EDIT: Additional information
Code:
public bool Upload(string remoteDirectory, List<FileInfo> filesToUpload)
{
bool success = false;
try
{
using (Session session = new Session())
{
session.ExecutablePath = sessionExecutablePath;
session.Open(sessionOptions);
foreach (FileInfo fi in filesToUpload)
{
// fi.FullName: "XXX\\premiumparty_banner.gif"
// remoteDirectory: "/home/storage/test/"
TransferOperationResult transferResult = session.PutFiles(fi.FullName, remoteDirectory);
transferResult.Check();
if (transferResult.IsSuccess)
{
success = true;
}
else
{
// TO DO - write an error message (ideally for each failed item).
}
}
}
}
catch
{
}
return success;
}
I have not used logging yet, however if I can get that working I will post logs here too.
I have blanked out most of the file path on the local computer, however please note that it includes Japanese characters.
Finally, note that I experience the same problem with session.ListDirectory() as well.
EDIT2: Log file
. 2013-11-18 17:26:33.064
--------------------------------------------------------------------------
. 2013-11-18 17:26:33.064 WinSCP Version 5.1.7 (Build 3446) (OS 6.1.7601 Service Pack 1)
. 2013-11-18 17:26:33.064 Configuration: nul
. 2013-11-18 17:26:33.065 Local account: jk_lee-PC\jamie_h
. 2013-11-18 17:26:33.065 Working directory: C:\Program Files (x86)\WinSCP
. 2013-11-18 17:26:33.065 Process ID: 1156
. 2013-11-18 17:26:33.065 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /xmllog="C:\Users\jamie_h\AppData\Local\Temp\wscp12BC.00EB2115.tmp" /xmlgroups /nointeractiveinput /dotnet=517 /ini=nul /log="C:\Users\jamie_h\Desktop\恋愛イベントツールのテストファイル\log1.log" /console /consoleinstance=_4796_348
. 2013-11-18 17:26:33.065 Time zone: Current: GMT+9, Standard: GMT+9, DST: GMT+10, DST Start: 1899/12/30, DST End: 1899/12/30
. 2013-11-18 17:26:33.065 Login time: 2013年11月18日 17:26:33
. 2013-11-18 17:26:33.065 --------------------------------------------------------------------------
. 2013-11-18 17:26:33.065 Session name: X#X.X.X.X (Ad-Hoc session)
. 2013-11-18 17:26:33.065 Host name: X.X.X.X (Port: 21)
. 2013-11-18 17:26:33.065 User name: X (Password: Yes, Key file: No)
. 2013-11-18 17:26:33.065 Tunnel: No
. 2013-11-18 17:26:33.065 Transfer Protocol: FTP
. 2013-11-18 17:26:33.065 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2013-11-18 17:26:33.065 Proxy: none
. 2013-11-18 17:26:33.065 FTP: FTPS: None; Passive: Yes [Force IP: A]; List all: A
. 2013-11-18 17:26:33.065 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2013-11-18 17:26:33.065 Cache directory changes: Yes, Permanent: Yes
. 2013-11-18 17:26:33.065 DST mode: 1; Timezone offset: 0h 0m
. 2013-11-18 17:26:33.065 --------------------------------------------------------------------------
. 2013-11-18 17:26:33.068 Connecting to X.X.X.X ...
. 2013-11-18 17:26:33.086 Connected with X.X.X.X. Waiting for welcome message...
< 2013-11-18 17:26:33.095 220 ProFTPD 1.3.3e Server (ProFTPD Default Installation) [::ffff:X.X.X.X]
> 2013-11-18 17:26:33.095 USER X
< 2013-11-18 17:26:33.105 331 Password required for X
> 2013-11-18 17:26:33.105 PASS ***********************
< 2013-11-18 17:26:33.116 230 User X logged in
> 2013-11-18 17:26:33.116 SYST
< 2013-11-18 17:26:33.124 215 UNIX Type: L8
> 2013-11-18 17:26:33.124 FEAT
< 2013-11-18 17:26:33.133 211-Features:
< 2013-11-18 17:26:33.133 MDTM
< 2013-11-18 17:26:33.143 MFMT
< 2013-11-18 17:26:33.143 LANG it-IT;zh-CN;ja-JP;fr-FR;zh-TW;ru-RU;ko-KR;en-US;bg-BG
< 2013-11-18 17:26:33.143 TVFS
< 2013-11-18 17:26:33.143 MFF modify;UNIX.group;UNIX.mode;
< 2013-11-18 17:26:33.143 MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
< 2013-11-18 17:26:33.143 REST STREAM
< 2013-11-18 17:26:33.143 SIZE
< 2013-11-18 17:26:33.143 211 End
. 2013-11-18 17:26:33.143 Connected
. 2013-11-18 17:26:33.143 --------------------------------------------------------------------------
. 2013-11-18 17:26:33.143 Using FTP protocol.
. 2013-11-18 17:26:33.143 Doing startup conversation with host.
> 2013-11-18 17:26:33.143 PWD
< 2013-11-18 17:26:33.152 257 "/" is the current directory
. 2013-11-18 17:26:33.152 Getting current directory name.
. 2013-11-18 17:26:33.152 Startup conversation with host finished.
< 2013-11-18 17:26:33.153 Script: Active session: [1] X#X.X.X.X
> 2013-11-18 17:26:33.293 Script: put -nopermissions -preservetime -transfer="binary" -- "XXX\05_デザイン\スマフォ版\イベント\131101_クリスマス準備はパーティーで!?GACHA\premiumparty_banner.gif" "/home/storage/test/"
. 2013-11-18 17:26:33.294 Copying 1 files/directories to remote directory "/home/storage/test/"
. 2013-11-18 17:26:33.294 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2013-11-18 17:26:33.294 TM: B; ClAr: No; CPS: 0; InclM:
. 2013-11-18 17:26:33.294 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2013-11-18 17:26:33.296 File: "XXX\05_デザイン\スマフォ版\イベント\131101_クリスマス準備はパーティーで!?GACHA\premiumparty_banner.gif"
. 2013-11-18 17:26:33.305 Copying "XXX\05_デザイン\スマフォ版\イベント\131101_クリスマス準備はパーティーで!?GACHA\premiumparty_banner.gif" to remote directory started.
. 2013-11-18 17:26:33.306 Binary transfer mode selected.
. 2013-11-18 17:26:33.306 Starting upload of XXX\05_デザイン\スマフォ版\イベント\131101_クリスマス準備はパーティーで!?GACHA\premiumparty_banner.gif
> 2013-11-18 17:26:33.307 CWD /home/storage/test/
< 2013-11-18 17:26:33.315 250 CWD command successful
> 2013-11-18 17:26:33.315 PWD
< 2013-11-18 17:26:33.325 257 "/home/storage/test" is the current directory
> 2013-11-18 17:26:33.325 TYPE A
< 2013-11-18 17:26:33.333 200 Type set to A
> 2013-11-18 17:26:33.333 PASV
< 2013-11-18 17:26:33.342 227 Entering Passive Mode (X,X,X,X,234,80).
> 2013-11-18 17:26:33.342 MLSD
< 2013-11-18 17:26:33.358 150 Opening ASCII mode data connection for MLSD
. 2013-11-18 17:26:33.359 modify=20131114025545;perm=adfrw;size=115;type=file;unique=806U300826;UNIX.group=1000;UNIX.mode=0644;UNIX.owner=1000; カラーコード.txt
. 2013-11-18 17:26:33.359 modify=20131111065000;perm=adfrw;size=5904;type=file;unique=806U300825;UNIX.group=1000;UNIX.mode=0644;UNIX.owner=1000; premiumparty_button_gray.gif
. 2013-11-18 17:26:33.359 modify=20131118012640;perm=flcdmpe;type=pdir;unique=806U30208F;UNIX.group=1000;UNIX.mode=0755;UNIX.owner=1000; ..
. 2013-11-18 17:26:33.359 modify=20131111064838;perm=adfrw;size=9353;type=file;unique=806U300824;UNIX.group=1000;UNIX.mode=0644;UNIX.owner=1000; premiumparty_button.gif
. 2013-11-18 17:26:33.359 modify=20131113032811;perm=adfrw;size=14664;type=file;unique=806U3007A1;UNIX.group=1000;UNIX.mode=0644;UNIX.owner=1000; premiumparty_banner.gif
. 2013-11-18 17:26:33.359 modify=20131118012649;perm=flcdmpe;type=cdir;unique=806U302090;UNIX.group=1000;UNIX.mode=0755;UNIX.owner=1000; .
< 2013-11-18 17:26:33.368 226 Transfer complete
> 2013-11-18 17:26:33.371 TYPE I
< 2013-11-18 17:26:33.380 200 Type set to I
> 2013-11-18 17:26:33.380 PASV
< 2013-11-18 17:26:33.388 227 Entering Passive Mode (X,X,X,X,234,87).
> 2013-11-18 17:26:33.389 STOR premiumparty_banner.gif
< 2013-11-18 17:26:33.406 150 Opening BINARY mode data connection for premiumparty_banner.gif
< 2013-11-18 17:26:33.431 226 Transfer complete
> 2013-11-18 17:26:33.431 MFMT 20131113032811 premiumparty_banner.gif
< 2013-11-18 17:26:33.440 213 Modify=20131113032811; premiumparty_banner.gif
. 2013-11-18 17:26:33.440 Upload successful
> 2013-11-18 17:26:33.463 Script: exit
. 2013-11-18 17:26:33.463 Script: Exit code: 0
. 2013-11-18 17:26:33.464 Disconnected from server
The line 2013-11-18 17:26:33.152 257 "/" is the current directory appears not to be true...

It's clear from the log that the session starts in / and upload takes place in /home/storage/test. As you claim that the file actually ends up in /home/zild/home/storage/test, it means that your FTP session is rooted in /home/zild (note that this path is never seen in the log).
There's nothing you can do about this on the client-side. If you need an access a folder outside your FTP root, either configure your FTP server not to root the session; or use different account (test?) that can access your desired folder.

Related

root nameservers doesn't return a Top-Level Domain NS record

Refer to this nslookup session:
>
> a.root-servers.net
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: a.root-servers.net
Address: 198.41.0.4
Name: a.root-servers.net
Address: 2001:503:ba3e::2:30
>
> server 198.41.0.4
Default server: 198.41.0.4
Address: 198.41.0.4#53
>
> set type=ns
> com.
;; connection timed out; no servers could be reached
This is when I tried from a linux server.
When I try from my own Windows machine:
> a.root-servers.net
Server: ip-10-220-201-1.eu-west-3.compute.internal
Address: 10.220.201.1
Non-authoritative answer:
DNS request timed out.
timeout was 2 seconds.
Name: a.root-servers.net
Address: 198.41.0.4
> server 198.41.0.4
Default Server: a.root-servers.net
Address: 198.41.0.4
> set type=ns
> com.
Server: a.root-servers.net
Address: 198.41.0.4
*** a.root-servers.net can't find com.: Non-existent domain
> com
Server: a.root-servers.net
Address: 198.41.0.4
*** a.root-servers.net can't find com: Non-existent domain
As far as I know, the root servers should be able to tell me about the Top-Level Domains, so why isn't it working?

"InvalidResourceName" when trying to access parquet files from Microsoft's Planetary Computer Blob Storage

I have some python code that makes a call to Microsoft's Planetary Computer api and gets back a signed url. I am then trying to call ogr2ogr in a subprocess to pull down the parquet files and insert them into a database.
When I use dask as illustrated in the example from the link above, everything works as expected:
asset = <Asset href=abfs://footprints/global/2022-06-14/ml-buildings.parquet/RegionName=Malaysia>
get_region = dask_geopandas.read_parquet(
asset.href, storage_options=asset.extra_fields["table:storage_options"]
)
get_region.to_parquet("some path")
This downloads all of the parquet files from Malaysia.
However, when I try to use ogr2ogr in a subprocess, I get an Azure "InvalidResourceName" name error:
connstring = f"PG:host=host.docker.internal port=2345 dbname={os.getenv('DATABASE_DB')} \
user={os.getenv('DATABASE_USER')} password={os.getenv('DATABASE_PW')}"
exp = ["ogr2ogr", "--debug", "ON", "--config", "CPL_CURL_VERBOSE", "YES",
"--config", "AZURE_STORAGE_ACCOUNT", asset.extra_fields["table:storage_options"]["account_name"],
"--config", "AZURE_STORAGE_ACCESS_TOKEN", asset.extra_fields["table:storage_options"]["credential"],
"-f", "PostgreSQL", connstring,
"/vsiadls/abfs://footprints/global/2022-06-14/ml-buildings.parquet/RegionName=Malaysia",
"-nln", f"{schema}.{tablename}",
"-sql",
f"SELECT geometry, RegionName, quadkey FROM {region}",
"-append",
"--config", "PG_USE_COPY", "YES"]
os.environ['AZURE_STORAGE_ACCOUNT'] = asset.extra_fields['table:storage_options']['account_name']
os.environ['AZURE_STORAGE_ACCESS_KEY'] = asset.extra_fields['table:storage_options']['credential']
subprocess.run(exp)
Error snippet:
* Connection #0 to host bingmlbuildings.dfs.core.windows.net left intact
ADLS: Got response_code=400
* Couldn't find host bingmlbuildings.dfs.core.windows.net in the (nil) file; using defaults
* Found bundle for host bingmlbuildings.dfs.core.windows.net: 0x40000f1a30 [serially]
* Can not multiplex, even if we wanted to!
* Re-using existing connection! (#0) with host bingmlbuildings.dfs.core.windows.net
* Connected to bingmlbuildings.dfs.core.windows.net (20.150.42.226) port 443 (#0)
> GET /abfs%3A?directory=%2Ffootprints%2Fglobal%2F2022-06-14%2Fml-buildings.parquet&maxresults=1000&recursive=false&resource=filesystem HTTP/1.1
Host: bingmlbuildings.dfs.core.windows.net
Accept: */*
x-ms-date: Thu, 03 Nov 2022 16:58:50 GMT
x-ms-version: 2019-12-12
Authorization: SharedKey bingmlbuildings:pBYJFXjZcwKHO0+qJwQ6qkb/+ae6YE7zhKfXlvZxFE4=
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 The specifed resource name contains invalid characters.
< Content-Length: 191
< Content-Type: application/json;charset=utf-8
< Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0
< x-ms-error-code: InvalidResourceName
< x-ms-request-id: c9856b49-901f-0082-55a5-ef2182000000
< x-ms-version: 2019-12-12
< Access-Control-Expose-Headers: Content-Length,Content-Type,Date,Server,x-ms-error-code,x-ms-request-id,x-ms-version
< Access-Control-Allow-Origin: *
< Date: Thu, 03 Nov 2022 16:58:49 GMT
<
* Connection #0 to host bingmlbuildings.dfs.core.windows.net left intact
ADLS: {"error":{"code":"InvalidResourceName","message":"The specifed resource name contains invalid characters.\nRequestId:c9856b49-901f-0082-55a5-ef2182000000\nTime:2022-11-03T16:58:50.6453948Z"}}
FAILURE:
Unable to open datasource `/vsiadls/abfs://footprints/global/2022-06-14/ml-buildings.parquet/RegionName=Malaysia' with the following drivers.
I can print the ENV variables and see the Azure Account and Azure Token. According to ogr2ogr's documentation, it should pick this up via environment variables. I have also tried setting them with the 'export' command via bash, and get the same error.
I will note that I am using the latest development version of osgeo/gdal in a docker container because ogr2ogr doesn't support multiple parquet files in a directory before version 3.6.
I will also note that I did not submit this question to gis.stackexchange because I am unsure if the error lies with Azure being unable to process the url that's being sent, or, if ogr2ogr's virtual driver (/vsiadls/) is at fault.

Artifactory not following git-lfs protocol

I am trying to improve the reliability of git-lfs on Artifactory and I analyzed the protocol between the client and artifactory.
The first part of downloading objects is to send a api command. {download, [{objectID, size},]
the reply
[{OID,size, auth,action[]},{}] the problem is action is a zero length array, the expected "download" information is not there.
I did a trace of a simple lfs clone. I also change the name to protect the guilty.
The problem is "_links" the new protocol uses "actions"
https://github.com/git-lfs/git-lfs/blob/master/docs/api/batch.md
"objects" : [ {
"oid" : "8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b",
"size" : 189,
"_links" : {
"download" : {
"href" : "https://server.org/artifactory/repo/objects/8b/4d/8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b",
"header" : {
"Authorization" : "Basic c3lzX21pZ2NpbHg6QVA1NVhjRWExeWhBVGZVRUxoeEpHcGplVktY"
}
}
}
}
######
GIT_TRACE=1 GIT_CURL_VERBOSE=1 git lfs clone git#github.com:svsintel/testlfs.git
12:28:42.951804 git.c:576 trace: exec: git-lfs clone git#github.com:svsintel/testlfs.git
12:28:42.951860 run-command.c:646 trace: run_command: git-lfs clone git#github.com:svsintel/testlfs.git
12:28:42.957381 trace git-lfs: run_command: 'git' version
WARNING: 'git lfs clone' is deprecated and will not be updated
with new flags from 'git clone'
'git clone' has been updated in upstream Git to have comparable
speeds to 'git lfs clone'.
Cloning into 'testlfs'...
X11 forwarding request failed on channel 0
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 9 (delta 0), reused 6 (delta 0), pack-reused 0
Receiving objects: 100% (9/9), done.
12:28:43.728998 trace git-lfs: run_command: 'git' config -l -f /home/savages/DEVEL/testlfs/.lfsconfig
12:28:43.730944 trace git-lfs: run_command: 'git' config -l
12:28:43.733209 trace git-lfs: run_command: 'git' -c filter.lfs.smudge= -c filter.lfs.clean= -c filter.lfs.process= -c filter.lfs.required=false rev-parse HEAD --symbolic-full-name HEAD
12:28:43.735365 trace git-lfs: run_command: 'git' -c filter.lfs.smudge= -c filter.lfs.clean= -c filter.lfs.process= -c filter.lfs.required=false rev-parse HEAD --symbolic-full-name HEAD
12:28:43.737654 trace git-lfs: tq: running as batched queue, batch size of 100
12:28:43.738479 trace git-lfs: run_command: git cat-file --batch
12:28:43.741076 trace git-lfs: fetch javaguidelink.png [8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b]
12:28:43.741198 trace git-lfs: tq: sending batch of size 1
Git LFS: (0 of 1 files) 0 B / 189 B 12:28:43.741587 trace git-lfs: api: batch 1 files
12:28:43.741724 trace git-lfs: HTTP: POST https://server.org/repo/objects/batch
> POST /artifactory/api/lfs/repo/objects/batch HTTP/1.1
> Host: server.org
> Accept: application/vnd.git-lfs+json; charset=utf-8
> Content-Length: 122
> Content-Type: application/vnd.git-lfs+json; charset=utf-8
> User-Agent: git-lfs/2.3.4 (GitHub; linux amd64; go 1.8.3)
>
{"operation":"download","objects":[{"oid":"8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b","size":189}]}12:28:44.552717 trace git-lfs: HTTP: 401
< HTTP/1.1 401 Unauthorized
< Transfer-Encoding: chunked
< Content-Type: application/json
< Date: Tue, 17 Dec 2019 20:28:44 GMT
< Server: Artifactory/5.3.0
< Set-Cookie: BIGipServerlbauto-af01p-ir-https=!lwwF2ZPxFqh78i9ZXUYuw/jzKcOV9bdWzE0rDvzrv7YDwaHF/aePpE4m4YlV0HLmvlOn3f4in6Ea; path=/; Httponly; Secure
< Www-Authenticate: Basic realm="Artifactory Realm"
< X-Artifactory-Id: a4228f8f67d17308ce2e6929fb0d1c96b8fc4fc0
< X-Artifactory-Node-Id: irvapp049
<
12:28:44.552948 trace git-lfs: HTTP: {
"errors" : [ {
"status" : 401,
"message" : "Authorization Required"
} ]
}
{
"errors" : [ {
"status" : 401,
"message" : "Authorization Required"
} ]
}12:28:44.553053 trace git-lfs: setting repository access to basic
12:28:44.553065 trace git-lfs: run_command: 'git' config --replace-all lfs.https://server.org/artifactory/api/lfs/repo.access basic
12:28:44.555768 trace git-lfs: api: http response indicates "basic" authentication. Resubmitting...
12:28:44.555852 trace git-lfs: creds: git credential fill ("https", "server.org", "artifactory/api/lfs/repo")
12:28:44.562949 trace git-lfs: Filled credentials for https://server.org/artifactory/api/lfs/repo
12:28:44.563100 trace git-lfs: HTTP: POST https://server.org/repo/objects/batch
> POST /artifactory/api/lfs/repo/objects/batch HTTP/1.1
> Host: server.org
> Accept: application/vnd.git-lfs+json; charset=utf-8
> Authorization: Basic * * * * *
> Content-Length: 122
> Content-Type: application/vnd.git-lfs+json; charset=utf-8
> User-Agent: git-lfs/2.3.4 (GitHub; linux amd64; go 1.8.3)
>
{"operation":"download","objects":[{"oid":"8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b","size":189}]}{"operation":"download","objects":[{"oid":"8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b","size":189}]}12:28:46.318344 trace git-lfs: HTTP: 200
< HTTP/1.1 200 OK
< Transfer-Encoding: chunked
< Content-Type: application/vnd.git-lfs+json
< Date: Tue, 17 Dec 2019 20:28:46 GMT
< Server: Artifactory/5.3.0
< Set-Cookie: BIGipServerlbauto-af01p-ir-https=!PuMWH2edbtitYCJZXUYuw/jzKcOV9b83tgCkdCyENMF11Shn6y8h8GdLZf7RA08ntnJe+hDmFL6BoA==; path=/; Httponly; Secure
< X-Artifactory-Id: a4228f8f67d17308ce2e6929fb0d1c96b8fc4fc0
< X-Artifactory-Node-Id: irvapp032
<
12:28:46.518402 trace git-lfs: HTTP: {
"objects" : [ {
"oid" : "8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b",
"size" : 189,
"_links" : {
"download" : {
"href" : "https://server.org/repo/objects/8b/4d/8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b",
"header" : {
"Authorization" : "Basic c3lzX21pZ2NpbHg6QVA1NVhjRWExeWhBVGZVRUxoeEpHcGplVktY"
}
}
}
} ]
}
{
"objects" : [ {
"oid" : "8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b",
"size" : 189,
"_links" : {
"download" : {
"href" : "https://server.org/repo/objects/8b/4d/8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b",
"header" : {
"Authorization" : "Basic c3lzX21pZ2NpbHg6QVA1NVhjRWExeWhBVGZVRUxoeEpHcGplVktY"
}
}
}
} ]
}12:28:46.518635 trace git-lfs: tq: starting transfer adapter "basic"
Git LFS: (0 of 1 files) 0 B / 189 B 12:28:46.519344 trace git-lfs: HTTP: GET https://server.org/artifactory/repo/objects/8b/4d/8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b
> GET /artifactory/repo/objects/8b/4d/8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b HTTP/1.1
> Host: server.org
> Authorization: Basic * * * * *
> User-Agent: git-lfs/2.3.4 (GitHub; linux amd64; go 1.8.3)
>
Git LFS: (0 of 1 files) 0 B / 189 B 12:28:47.326791 trace git-lfs: HTTP: 200
< HTTP/1.1 200 OK
< Content-Length: 189
< Accept-Ranges: bytes
< Content-Disposition: attachment; filename="8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b"; filename*=UTF-8''8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b
< Content-Type: application/octet-stream
< Date: Tue, 17 Dec 2019 20:28:47 GMT
< Etag: b0b31c0cbccf04819012d82385f3966ba0856d18
< Last-Modified: Fri, 02 Aug 2019 09:42:37 GMT
< Server: Artifactory/5.3.0
< Set-Cookie: BIGipServerlbauto-af01p-ir-https=!kfSG8soGK6fsAIdZXUYuw/jzKcOV9czEPoAj80t8OIgyLdw5+B9YrT0o6uFWA5Jp3HDyK32k00JB; path=/; Httponly; Secure
< X-Artifactory-Filename: 8b4d08d6b3a211d6bb09f636ebdfcdc88ade2f20bd0c011954929b4a65aec07b
< X-Artifactory-Id: a4228f8f67d17308ce2e6929fb0d1c96b8fc4fc0
< X-Artifactory-Node-Id: irvapp049
< X-Checksum-Md5: b36c320fa2845b3c75f95685474843c9
< X-Checksum-Sha1: b0b31c0cbccf04819012d82385f3966ba0856d18
<
Git LFS: (1 of 1 files) 189 B / 189 B
12:28:47.556210 trace git-lfs: Install hook: pre-push, force=false, path=/home/savages/DEVEL/testlfs/.git/hooks/pre-push, upgrading...
12:28:47.556810 trace git-lfs: Install hook: post-checkout, force=false, path=/home/savages/DEVEL/testlfs/.git/hooks/post-checkout, upgrading...
12:28:47.557303 trace git-lfs: Install hook: post-commit, force=false, path=/home/savages/DEVEL/testlfs/.git/hooks/post-commit, upgrading...
12:28:47.558058 trace git-lfs: Install hook: post-merge, force=false, path=/home/savages/DEVEL/testlfs/.git/hooks/post-merge, upgrading...
Artifactory version 3.9 onwards supports gitLFS protocol.
https://www.jfrog.com/confluence/display/JFROG/Git+LFS+Repositories

Server can't find NXDOMAIN

I'm just tring to configure a DNS server in my local
I configure the /etc/named.conf
options {
listen-on port 53 {
127.0.0.1; 192.168.220.135;
};
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query {
localhost; 192.168.220.0/24;
};
allow-transfer{
localhost; 192.168.220.136;
};
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
also-notify {
};
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "ayoub.local" IN {
type master;
file "direct.zone";
#allow-update {none;};
};
zone "220.168.192.in-addr.arpa" IN {
type master;
file "inverse.zone";
#allow-update {none;};};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
and /var/named/direct.zone
**$TTL 3H
# IN SOA MasterDNS.ayoub.local. root.ayoub.local. (
20160421 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minim
# IN NS MasterDNS.ayoub.local.
# IN NS SlaveDNS.ayoub.local.
# IN A 192.168.220.135
# IN A 192.168.220.136
# IN A 192.168.220.137
MasterDNS IN A 192.168.220.135
SlaveDNS IN A 192.168.220.136
Client IN A 192.168.220.137
and the /var/named/inverse.zone
$TTL 3H
# IN SOA MasterDNS.ayoub.local. root.ayoub.local. (
20160418 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
# IN NS MasterDNS.ayoub.local.
# IN NS SlaveDNS.ayoub.local.
# IN PTR ayoub.local.
MasterDNS IN A 192.168.220.135
SlaveDNS IN A 192.168.220.136
Client IN A 192.168.220.137
135 IN PTR MasterDNS.ayoub.local.
136 IN PTR SlaveDNS.ayoub.local.
137 IN PTR Client1.ayoub.local.
and the /etc/resolv.conf
domain ayoub.local
search ayoub.local
nameserver 127.0.0.1
nameserver 192.168.220.136
when i test the domaine with nslookup
;; Got SERVFAIL reply from 127.0.0.1, trying next server
;; connection timed out; trying next origin
;; Got SERVFAIL reply from 127.0.0.1, trying next server
;; connection timed out; no servers could be reached
and when i set /etc/resolv.conf with that
search localdomain
nameserver 192.168.220.2
i see comme result of nslookup
Server: 192.168.220.2
Address: 192.168.220.2#53
** server can't find ayoub.local: NXDOMAIN
Sometimes error happens due to nameserver 127.0.0.1
So in resolve.conf use following or any other name server you like.
Here is my resolve.conf file
nameserver 8.8.8.8
nameserver 1.1.1.1
I resolved the problem. I just forgot to change the group of direct. zone and inverse.zone from the root to named, command is :
chgroup named /var/named/direct.zone
and I force resolve to not changing by the DHCP :
chattr +i /etc/resolv.conf

Issues Setting Up DNS on Linux BIND

I am actually try to setup a DNS and adding an A record for an host that is locally on the network . It looks it seems to have some issues .
[root#vxctf8500 ~]# nslookup N8500
Server: 10.209.194.15
Address: 10.209.194.15#53
Non-authoritative answer:
*** Can't find N8500: No answer
Following The Configuration Files ::
named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
listen-on port 53 { 127.0.0.1;10.209.194.15; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query {any;};
allow-recursion {any;};
recursion no;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone"vxctf8500.com" IN {
type master;
file "forward.vxctf8500.com";
allow-update { none; };
};
zone"0.209.10.in-addr.arpa" IN {
type master;
file "reverse.vxctf8500.com";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
Forward Zone ::
$TTL 1D
# IN SOA ns1.vxctf8500.com. root.vxctf8500.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
# IN NS vxctf8500.com.
# IN A 10.209.194.15
N8500 A 10.209.194.22
~
With , keeping recursion as YES, the query never completes and gives network error. However the local server resolves
[root#vxctf8500 ~]# nslookup vxctf8500.com
Server: 10.209.194.15
Address: 10.209.194.15#53
Name: vxctf8500.com
Address: 10.209.194.15
[root#vxctf8500 ~]#
Tried With Following Again ::
$TTL 1D
# IN SOA ns1.vxctf8500.com. root.vxctf8500.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS vxctf8500.com.
IN A 10.209.194.15
ns1.vxctf8500.com IN A 10.209.194.15
N8500 IN A 10.209.194.22
[root#vxctf8500 ~]# nslookup N8500
Server: 10.209.194.15
Address: 10.209.194.15#53
Non-authoritative answer:
*** Can't find N8500: No answer
[root#vxctf8500 ~]#
Have also restart the named services.
Any Clues on Setting up Reverse Lookup ::
$TTL 1D
# IN SOA ns1.vxctf8500.com. root.vxctf8500.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS #
A 127.0.0.1
AAAA ::1
IN NS 10.209.194.15.
22 IN PTR nclusters.vxctf8500.com
23 IN PTR nclusters.vxctf8500.com
24 IN PTR nclusters.vxctf8500.com
25 IN PTR nclusters.vxctf8500.com
26 IN PTR nclusters.vxctf8500.com
in forward zone
you need to write
(fully qualified domain ) IN A (ip address of domain)
================================================
IN SOA
ns1.vxctf8500.com. root.vxctf8500.com.
(
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS vxctf8500.com.
IN A 10.209.194.15
ns1.vxctf8500.com. IN A 10.209.194.15
N8500. IN A 10.209.194.22
:wq! save it

Resources