Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian vs Ubuntu #124

Open
era404design opened this issue Sep 25, 2023 · 2 comments
Open

Debian vs Ubuntu #124

era404design opened this issue Sep 25, 2023 · 2 comments

Comments

@era404design
Copy link

era404design commented Sep 25, 2023

This is possibly user error and not a package issue.
I've got two servers, both with the same version of this package:

cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"

php -v
PHP 7.4.33 (cli) (built: Jan  7 2023 08:30:58) ( NTS )

smbclient -V
Version 4.9.5-Debian

and

cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.7 LTS (Xenial Xerus)"

php -v
PHP 7.4.18 (cli) (built: May  3 2021 11:26:29) ( NTS )

smbclient -V
Version 4.3.11-Ubuntu

The debian system can list shares, list directory contents, and perform file transfers
The ubuntu system can list shares, but cannot list directory contents, and consequently, cannot perform transfers.

I've tried command-line smb and have no problems with ubuntu, it's purely a PHP/package issue, it seems.

Is this a known problem, or is it just my setup?

Thanks

Note: #115
I'm not sure this is related, but i'm seeing the same result -- no fault, just an empty directory contents object.

@era404design
Copy link
Author

FYI: tested afterward on a newer Ubuntu system:

cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"

php -v
PHP 7.4.33 (cli) (built: Sep  2 2023 08:03:46) ( NTS )

smbclient -V
Version 4.15.13-Ubuntu

Everything on this setup is working as expected.

@joshtrichards
Copy link

Hi @era404design - Are you using smbclient (Wrapped) or libsmbclient-php/libsmbclient (Native) mode?

I've tried command-line smb and have no problems with ubuntu, it's purely a PHP/package issue, it seems.

How does the output compare between the two versions when doing this via the smbclient CLI:

cd <path>
dir
cd /

i.e. basically manually simulating what the dir() here does (at least when Wrapped):

SMB/src/Wrapped/Share.php

Lines 174 to 186 in 8531ffd

public function dir(string $path): array {
$escapedPath = $this->escapePath($path);
$output = $this->execute('cd ' . $escapedPath);
//check output for errors
$this->parseOutput($output, $path);
$output = $this->execute('dir');
$this->execute('cd /');
return $this->parser->parseDir($output, $path, function (string $path) {
return $this->getAcls($path);
});
}

You might also try applying the contents of #115.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants