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

files_external don't acept "$user" in version 16.0.1 #15934

Closed
Trujo-Dilar opened this issue Jun 12, 2019 · 30 comments
Closed

files_external don't acept "$user" in version 16.0.1 #15934

Trujo-Dilar opened this issue Jun 12, 2019 · 30 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info

Comments

@Trujo-Dilar
Copy link

Trujo-Dilar commented Jun 12, 2019

Steps to reproduce

  1. pkexec -u www-data php /mnt/Datos-Nube/www/nextcloud/occ -V

    16.0.1
  2. I try with:

pkexec -u www-data php /mnt/Datos-Nube/www/nextcloud/occ -vvv files_external:list

+----------+-------------+------------+-------------------------------------+-----------------------------------------------------------------------------------------------------------+---------+------------------+-------------------+
| Mount ID | Mount Point | Storage | Authentication Type | Configuration | Options | Applicable Users | Applicable Groups |
+----------+-------------+------------+-------------------------------------+-----------------------------------------------------------------------------------------------------------+---------+------------------+-------------------+
| 15 | /Privada | SMB / CIFS | Log-in credentials, save in session | host: "10.107.20.167", share: "prueba", root: "usuario1", domain: "MYDOMAIN" | | All | |
+----------+-------------+------------+-------------------------------------+-----------------------------------------------------------------------------------------------------------+---------+------------------+-------------------+
It work
2.I try:
root@gr00snube1:/home/MYDOMAIN/adm_trujilloantonio# pkexec -u www-data php /mnt/Datos-Nube/www/nextcloud/occ -vvv files_external:config 15 root '$user'
root@gr00snube1:/home/MYDOMAIN/adm_trujilloantonio# pkexec -u www-data php /mnt/Datos-Nube/www/nextcloud/occ -vvv files_external:list
+----------+-------------+------------+-------------------------------------+-----------------------------------------------------------------------------------------------------------+---------+------------------+-------------------+
| Mount ID | Mount Point | Storage | Authentication Type | Configuration | Options | Applicable Users | Applicable Groups |
+----------+-------------+------------+-------------------------------------+-----------------------------------------------------------------------------------------------------------+---------+------------------+-------------------+
| 15 | /Privada | SMB / CIFS | Log-in credentials, save in session | host: "10.107.20.167", share: "prueba", root: "$user", domain: "MYDOMAIN" | | All | |
+----------+-------------+------------+-------------------------------------+-----------------------------------------------------------------------------------------------------------+---------+------------------+-------------------+
It don't work
3.I try:

pkexec -u www-data php /mnt/Datos-Nube/www/nextcloud/occ -vvv files_external:config 15 root usuario1

root@gr00snube1:/home/MYDOMAIN/adm_trujilloantonio# pkexec -u www-data php /mnt/Datos-Nube/www/nextcloud/occ -vvv files_external:config 15 share prueba$
root@gr00snube1:/home/MYDOMAIN/adm_trujilloantonio# pkexec -u www-data php /mnt/Datos-Nube/www/nextcloud/occ -vvv files_external:list
+----------+-------------+------------+-------------------------------------+-----------------------------------------------------------------------------------------------------------+---------+------------------+-------------------+
| Mount ID | Mount Point | Storage | Authentication Type | Configuration | Options | Applicable Users | Applicable Groups |
+----------+-------------+------------+-------------------------------------+-----------------------------------------------------------------------------------------------------------+---------+------------------+-------------------+
| 15 | /Privada | SMB / CIFS | Log-in credentials, save in session | host: "10.107.20.167", share: "prueba$", root: "usuario1", domain: "MYDOMAIN" | | All | |
+----------+-------------+------------+-------------------------------------+-----------------------------------------------------------------------------------------------------------+---------+------------------+-------------------+
It don't work

Expected behaviour

I must access external storage share in windows server //server/privada$/$user
example:

smbclient -U usuario1 -W MYDOMAIN \\10.107.20.167\privada$ -D user1

Enter MYDOMAIN\user1's password:
Try "help" to get a list of possible commands.
smb: \usuario1> ls
. D 0 Fri Sep 14 13:42:40 2018
.. D 0 Fri Sep 14 13:42:40 2018

8388608 blocks of size 4096. 8388607 blocks available

smb: \usuario1> exit

Tell us what should happen

Actual behaviour

Tell us what happens instead

Server configuration

Operating system:
Linux gr00snube1 4.19.0-1-amd64 #1 SMP Debian 4.19.12-1 (2018-12-22) x86_64 GNU/Linux
Web server:

apache2 --version

[Wed Jun 12 13:17:49.421451 2019] [core:warn] [pid 92979] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot

Database:
external MariaDB
PHP version:

php --version

PHP 7.3.4-2 (cli) (built: Apr 13 2019 19:05:48) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.4, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.4-2, Copyright (c) 1999-2018, by Zend Technologies

Nextcloud version: (see Nextcloud admin page)

pkexec -u www-data php /mnt/Datos-Nube/www/nextcloud/occ -V

16.0.1

Updated from an older Nextcloud/ownCloud or fresh install:
fresh install

Where did you install Nextcloud from:
https://download.nextcloud.com/server/releases/nextcloud-16.0.1.zip
Signing status:

Signing status
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.
No errors have been found.

List of activated apps:

App list # pkexec -u www-data php /mnt/Datos-Nube/www/nextcloud/occ app:list Enabled: - accessibility: 1.2.0 - activity: 2.9.1 - cloud_federation_api: 0.2.0 - comments: 1.6.0 - dav: 1.9.2 - dicomviewer: 1.2.0 - extract: 1.2.0 - federatedfilesharing: 1.6.0 - federation: 1.6.0 - files: 1.11.0 - files_accesscontrol: 1.6.0 - files_external: 1.7.0 - files_pdfviewer: 1.5.0 - files_rightclick: 0.13.0 - files_sharing: 1.8.0 - files_snapshots: 0.2.0 - files_texteditor: 2.8.0 - files_trashbin: 1.6.0 - files_versions: 1.9.0 - files_videoplayer: 1.5.0 - firstrunwizard: 2.5.0 - gallery: 18.3.0 - groupfolders: 4.0.2 - groupquota: 0.1.0 - logreader: 2.1.0 - lookup_server_connector: 1.4.0 - nextcloud_announcements: 1.5.0 - notifications: 2.4.1 - oauth2: 1.4.2 - occweb: 0.0.4 - password_policy: 1.6.0 - privacy: 1.0.0 - provisioning_api: 1.6.0 - recommendations: 0.4.0 - richdocuments: 3.3.8 - serverinfo: 1.6.0 - sharebymail: 1.6.0 - spreed: 6.0.1 - support: 1.0.0 - survey_client: 1.4.0 - systemtags: 1.6.0 - theming: 1.7.0 - twofactor_backupcodes: 1.5.0 - updatenotification: 1.6.0 - user_ldap: 1.6.0 - user_saml: 2.3.1 - viewer: 1.0.0 - workflowengine: 1.6.0 Disabled: - admin_audit - encryption

Nextcloud configuration:

Config report # pkexec -u www-data php /mnt/Datos-Nube/www/nextcloud/occ config:list { "system": { "debug": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "gr00snube.dmsas.sda.sas.junta-andalucia.es" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "16.0.1.1", "overwrite.cli.url": "https:\/\/gr00snube.dmsas.sda.sas.junta-andalucia.es", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "proxy": "proxy.hvn.sas.junta-andalucia.es:8080", "memcache.local": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 6379, "timeout": 0, "password": "***REMOVED SENSITIVE VALUE***", "dbindex": 0 }, "memcache.locking": "\\OC\\Memcache\\Redis", "ldapIgnoreNamingRules": false, "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory", "maintenance": false, "app_install_overwrite": [ "occweb" ] }, "apps": { "accessibility": { "enabled": "yes", "installed_version": "1.2.0", "types": "" }, "activity": { "enabled": "yes", "installed_version": "2.9.1", "types": "filesystem" }, "backgroundjob": { "lastjob": "305437" }, "cloud_federation_api": { "enabled": "yes", "installed_version": "0.2.0", "types": "filesystem" }, "comments": { "enabled": "yes", "installed_version": "1.6.0", "types": "logging" }, "core": { "backgroundjobs_mode": "cron", "installedat": "1559288813.0342", "lastcron": "1560336171", "lastupdateResult": "[]", "lastupdatedat": "1560332612", "oc.integritycheck.checker": "[]", "public_files": "files_sharing\/public.php", "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php", "scss.variables": "9888f05a59c7e1b416b67b6a76175e85", "vendor": "nextcloud" }, "dav": { "enabled": "yes", "installed_version": "1.9.2", "types": "filesystem" }, "dicomviewer": { "enabled": "yes", "installed_version": "1.2.0", "types": "" }, "extract": { "enabled": "yes", "installed_version": "1.2.0", "types": "" }, "federatedfilesharing": { "enabled": "yes", "installed_version": "1.6.0", "types": "" }, "federation": { "enabled": "yes", "installed_version": "1.6.0", "types": "authentication" }, "files": { "cronjob_scan_files": "11000", "enabled": "yes", "installed_version": "1.11.0", "types": "filesystem" }, "files_accesscontrol": { "enabled": "yes", "installed_version": "1.6.0", "types": "filesystem" }, "files_external": { "allow_user_mounting": "yes", "enabled": "yes", "installed_version": "1.7.0", "types": "filesystem", "user_mounting_backends": "smb,\\OC\\Files\\Storage\\SMB_OC" }, "files_pdfviewer": { "enabled": "yes", "installed_version": "1.5.0", "types": "" }, "files_rightclick": { "enabled": "yes", "installed_version": "0.13.0", "types": "" }, "files_sharing": { "enabled": "yes", "installed_version": "1.8.0", "types": "filesystem" }, "files_snapshots": { "enabled": "yes", "installed_version": "0.2.0", "types": "" }, "files_texteditor": { "enabled": "yes", "installed_version": "2.8.0", "types": "" }, "files_trashbin": { "enabled": "yes", "installed_version": "1.6.0", "types": "filesystem,dav" }, "files_versions": { "enabled": "yes", "installed_version": "1.9.0", "types": "filesystem,dav" }, "files_videoplayer": { "enabled": "yes", "installed_version": "1.5.0", "types": "" }, "firstrunwizard": { "enabled": "yes", "installed_version": "2.5.0", "types": "logging" }, "gallery": { "enabled": "yes", "installed_version": "18.3.0", "types": "" }, "groupfolders": { "enabled": "yes", "installed_version": "4.0.2", "types": "filesystem,dav" }, "groupquota": { "enabled": "yes", "installed_version": "0.1.0", "types": "filesystem" }, "logreader": { "enabled": "yes", "installed_version": "2.1.0", "types": "" }, "lookup_server_connector": { "enabled": "yes", "installed_version": "1.4.0", "types": "authentication" }, "nextcloud_announcements": { "enabled": "yes", "installed_version": "1.5.0", "types": "logging" }, "notifications": { "enabled": "yes", "installed_version": "2.4.1", "types": "logging" }, "oauth2": { "enabled": "yes", "installed_version": "1.4.2", "types": "authentication" }, "occweb": { "enabled": "yes", "installed_version": "0.0.4", "types": "" }, "password_policy": { "enabled": "yes", "installed_version": "1.6.0", "types": "" }, "privacy": { "enabled": "yes", "installed_version": "1.0.0", "readableLocation": "es", "types": "" }, "provisioning_api": { "enabled": "yes", "installed_version": "1.6.0", "types": "prevent_group_restriction" }, "recommendations": { "enabled": "yes", "installed_version": "0.4.0", "types": "" }, "richdocuments": { "disable_certificate_verification": "yes", "enabled": "yes", "installed_version": "3.3.8", "types": "filesystem,dav,prevent_group_restriction", "wopi_url": "https:\/\/10.104.20.241:9980" }, "serverinfo": { "enabled": "yes", "installed_version": "1.6.0", "types": "" }, "sharebymail": { "enabled": "yes", "installed_version": "1.6.0", "types": "filesystem" }, "spreed": { "enabled": "yes", "installed_version": "6.0.1", "stun_servers": "[\"stun.nextcloud.com:443\"]", "types": "prevent_group_restriction" }, "support": { "enabled": "yes", "installed_version": "1.0.0", "types": "" }, "survey_client": { "enabled": "yes", "installed_version": "1.4.0", "types": "" }, "systemtags": { "enabled": "yes", "installed_version": "1.6.0", "types": "logging" }, "theming": { "cachebuster": "24", "color": "#15782F", "enabled": "yes", "faviconMime": "image\/png", "installed_version": "1.7.0", "logoMime": "image\/png", "logoheaderMime": "image\/png", "name": "Archivos sanitarios en la nube", "slogan": "Por la seguridad de los pacientes", "types": "logging", "url": "https:\/\/hospitalgranada.es" }, "twofactor_backupcodes": { "enabled": "yes", "installed_version": "1.5.0", "types": "" }, "updatenotification": { "enabled": "yes", "installed_version": "1.6.0", "richdocuments": "3.3.8", "spreed": "6.0.2", "types": "", "update_check_errors": "0" }, "user_ldap": { "background_sync_interval": "1800", "background_sync_offset": "9000", "background_sync_prefix": "s01", "cleanUpJobOffset": "4950", "enabled": "yes", "installed_version": "1.6.0", "s01_lastChange": "1560334457", "s01has_memberof_filter_support": "1", "s01home_folder_naming_rule": "", "s01last_jpegPhoto_lookup": "0", "s01ldap_agent_password": "U3JHUmE2NzUqag==", "s01ldap_attributes_for_group_search": "", "s01ldap_attributes_for_user_search": "", "s01ldap_backup_host": "", "s01ldap_backup_port": "", "s01ldap_base": "DC=dmsas,DC=sda,DC=sas,DC=junta-andalucia,DC=es", "s01ldap_base_groups": "OU=Granada,DC=dmsas,DC=sda,DC=sas,DC=junta-andalucia,DC=es", "s01ldap_base_users": "OU=Granada,DC=dmsas,DC=sda,DC=sas,DC=junta-andalucia,DC=es", "s01ldap_cache_ttl": "600", "s01ldap_configuration_active": "1", "s01ldap_default_ppolicy_dn": "", "s01ldap_display_name": "displayname", "s01ldap_dn": "CN=Srvc_GR00QueryAD,OU=Usuarios,OU=Admin,OU=ServiciosProvinciales,OU=Granada,DC=dmsas,DC=sda,DC=sas,DC=junta-andalucia,DC=es", "s01ldap_dynamic_group_member_url": "", "s01ldap_email_attr": "mail", "s01ldap_experienced_admin": "0", "s01ldap_expert_username_attr": "", "s01ldap_expert_uuid_group_attr": "", "s01ldap_expert_uuid_user_attr": "", "s01ldap_ext_storage_home_attribute": "", "s01ldap_gid_number": "gidNumber", "s01ldap_group_display_name": "cn", "s01ldap_group_filter": "(&(|(objectclass=group)))", "s01ldap_group_filter_mode": "0", "s01ldap_group_member_assoc_attribute": "member", "s01ldap_groupfilter_groups": "", "s01ldap_groupfilter_objectclass": "group", "s01ldap_host": "10.104.16.78", "s01ldap_login_filter": "(&(&(|(objectclass=person)))(samaccountname=%uid))", "s01ldap_login_filter_mode": "0", "s01ldap_loginfilter_attributes": "", "s01ldap_loginfilter_email": "0", "s01ldap_loginfilter_username": "1", "s01ldap_nested_groups": "0", "s01ldap_override_main_server": "", "s01ldap_paging_size": "500", "s01ldap_port": "389", "s01ldap_quota_attr": "", "s01ldap_quota_def": "", "s01ldap_tls": "0", "s01ldap_turn_off_cert_check": "0", "s01ldap_turn_on_pwd_change": "0", "s01ldap_user_avatar_rule": "default", "s01ldap_user_display_name_2": "", "s01ldap_user_filter_mode": "0", "s01ldap_userfilter_groups": "", "s01ldap_userfilter_objectclass": "person", "s01ldap_userlist_filter": "(&(|(objectclass=person)))", "s01use_memberof_to_detect_membership": "1", "types": "authentication" }, "user_saml": { "enabled": "yes", "installed_version": "2.3.1", "types": "authentication" }, "viewer": { "enabled": "yes", "installed_version": "1.0.0", "types": "" }, "workflowengine": { "enabled": "yes", "installed_version": "1.6.0", "types": "filesystem" } } }

Are you using external storage, if yes which one: local/smb/sftp/...
yes
//server/privada$/$user
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
ActiveDirectory

LDAP configuration (delete this part if not used)

LDAP config
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder
# pkexec -u www-data php /mnt/Datos-Nube/www/nextcloud/occ ldap:show-config
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| Configuration                 | s01                                                                                                                          |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                                                                            |
| homeFolderNamingRule          |                                                                                                                              |
| lastJpegPhotoLookup           | 0                                                                                                                            |
| ldapAgentName                 | CN=Srvc_GR00QueryAD,OU=Usuarios,OU=Admin,OU=ServiciosProvinciales,OU=Granada,DC=dmsas,DC=sda,DC=sas,DC=junta-andalucia,DC=es |
| ldapAgentPassword             | ***                                                                                                                          |
| ldapAttributesForGroupSearch  |                                                                                                                              |
| ldapAttributesForUserSearch   |                                                                                                                              |
| ldapBackupHost                |                                                                                                                              |
| ldapBackupPort                |                                                                                                                              |
| ldapBase                      | DC=dmsas,DC=sda,DC=sas,DC=junta-andalucia,DC=es                                                                              |
| ldapBaseGroups                | OU=Granada,DC=dmsas,DC=sda,DC=sas,DC=junta-andalucia,DC=es                                                                   |
| ldapBaseUsers                 | OU=Granada,DC=dmsas,DC=sda,DC=sas,DC=junta-andalucia,DC=es                                                                   |
| ldapCacheTTL                  | 600                                                                                                                          |
| ldapConfigurationActive       | 1                                                                                                                            |
| ldapDefaultPPolicyDN          |                                                                                                                              |
| ldapDynamicGroupMemberURL     |                                                                                                                              |
| ldapEmailAttribute            | mail                                                                                                                         |
| ldapExperiencedAdmin          | 0                                                                                                                            |
| ldapExpertUUIDGroupAttr       |                                                                                                                              |
| ldapExpertUUIDUserAttr        |                                                                                                                              |
| ldapExpertUsernameAttr        |                                                                                                                              |
| ldapExtStorageHomeAttribute   |                                                                                                                              |
| ldapGidNumber                 | gidNumber                                                                                                                    |
| ldapGroupDisplayName          | cn                                                                                                                           |
| ldapGroupFilter               | (&(|(objectclass=group)))                                                                                                    |
| ldapGroupFilterGroups         |                                                                                                                              |
| ldapGroupFilterMode           | 0                                                                                                                            |
| ldapGroupFilterObjectclass    | group                                                                                                                        |
| ldapGroupMemberAssocAttr      | member                                                                                                                       |
| ldapHost                      | 10.104.16.78                                                                                                                 |
| ldapIgnoreNamingRules         |                                                                                                                              |
| ldapLoginFilter               | (&(&(|(objectclass=person)))(samaccountname=%uid))                                                                           |
| ldapLoginFilterAttributes     |                                                                                                                              |
| ldapLoginFilterEmail          | 0                                                                                                                            |
| ldapLoginFilterMode           | 0                                                                                                                            |
| ldapLoginFilterUsername       | 1                                                                                                                            |
| ldapNestedGroups              | 0                                                                                                                            |
| ldapOverrideMainServer        |                                                                                                                              |
| ldapPagingSize                | 500                                                                                                                          |
| ldapPort                      | 389                                                                                                                          |
| ldapQuotaAttribute            |                                                                                                                              |
| ldapQuotaDefault              |                                                                                                                              |
| ldapTLS                       | 0                                                                                                                            |
| ldapUserAvatarRule            | default                                                                                                                      |
| ldapUserDisplayName           | displayname                                                                                                                  |
| ldapUserDisplayName2          |                                                                                                                              |
| ldapUserFilter                | (&(|(objectclass=person)))                                                                                                   |
| ldapUserFilterGroups          |                                                                                                                              |
| ldapUserFilterMode            | 0                                                                                                                            |
| ldapUserFilterObjectclass     | person                                                                                                                       |
| ldapUuidGroupAttribute        | auto                                                                                                                         |
| ldapUuidUserAttribute         | auto                                                                                                                         |
| turnOffCertCheck              | 0                                                                                                                            |
| turnOnPasswordChange          | 0                                                                                                                            |
| useMemberOfToDetectMembership | 1                                                                                                                            |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------+

</details>

### Client configuration
**Browser:**
any
**Operating system:**
any
### Logs
#### Web server error log
<details>
<summary>Web server error log</summary>

Insert your webserver log here

</details>

#### Nextcloud log (data/nextcloud.log)
<details>
<summary>Nextcloud log</summary>
It's very log with toomuch sensitive information and no related error
</details>
with a tail:
/var/www/nextcloud# tail -f data/nextcloud.log 
.../...
{"reqId":"VWKJrPGLKKlYO0RjUl2d","level":3,"time":"2019-06-12T11:35:30+00:00","remoteAddr":"10.104.24.53","user":"3F0116BF-E531-41A6-BBC0-0425113BCF32","app":"files_external","method":"GET","url":"\/index.php\/apps\/files_external\/globalstorages\/15?testOnly=true","message":"A placeholder was not substituted: prueba$ for mount type \\OCA\\Files_External\\Lib\\Storage\\SMB","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:60.0) Gecko\/20100101 Firefox\/60.0","version":"16.0.1.1"}
{"reqId":"I3I95cRmkRxsDTPjxGrv","level":3,"time":"2019-06-12T11:35:53+00:00","remoteAddr":"10.104.24.53","user":"3F0116BF-E531-41A6-BBC0-0425113BCF32","app":"files_external","method":"PUT","url":"\/index.php\/apps\/files_external\/globalstorages\/15","message":"A placeholder was not substituted: prueba$ for mount type \\OCA\\Files_External\\Lib\\Storage\\SMB","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:60.0) Gecko\/20100101 Firefox\/60.0","version":"16.0.1.1"}


#### Browser log
<details>
I use different browser with equal result and no error.
<summary>Browser log</summary>

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c)

</details>

@Trujo-Dilar Trujo-Dilar added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jun 12, 2019
@kesselb
Copy link
Contributor

kesselb commented Jun 12, 2019

Duplicate of #15567

@kesselb kesselb marked this as a duplicate of #15567 Jun 12, 2019
@kesselb kesselb closed this as completed Jun 12, 2019
@Trujo-Dilar
Copy link
Author

OK this resolv $ in share but not $ in $user,
right now I can connect to //server/privada$/usuario1 but not to //server/privada$/$user

@Trujo-Dilar Trujo-Dilar changed the title files_external don't acept "$" in version 16.0.1 files_external don't acept "$user" in version 16.0.1 Jun 12, 2019
@Trujo-Dilar
Copy link
Author

Trujo-Dilar commented Jun 12, 2019 via email

@kesselb
Copy link
Contributor

kesselb commented Jun 12, 2019

Would you mind to make your issue report more readable? The formatting makes it quite hard to read.

$user should be replaced with the actual username right?

cc @blizzz @wiswedel Is it possible to use $user in share name?

@thoschi
Copy link

thoschi commented Jun 12, 2019

Same problem with us. Since NC16 we are unable to edit files in collabora in users shared folders ($user). It worked perfectly before.

The NC logfile says:

{"reqId":"nEfnQSzzvc1L3nZrqsYN","level":3,"time":"2019-06-12T18:08:55+00:00","remoteAddr":"172.17.0.2","user":"--","app":"PHP","method":"GET","url":"/index.php/apps/richdocuments/wopi/files/532905_ocj9n69xc60s?access_token=dPWfls7aoU9zMjOCJXCRNpNkIu1WRsum&access_token_ttl=0&permission=edit","message":"Undefined offset: 0 at /opt/nextcloud/apps/richdocuments/lib/Controller/WopiController.php#132","userAgent":"LOOLWSD WOPI Agent 4.0.4","version":"16.0.1.1"}

@thoschi
Copy link

thoschi commented Jun 12, 2019

I can also confirm that it is definitely connected to the $user Variable.
If I mount the share manually, editing is possible as before.

@wiswedel
Copy link
Contributor

CC @schiessle

@Trujo-Dilar
Copy link
Author

Trujo-Dilar commented Jun 13, 2019

I'm sorry to send a image but if I try to verify by occ, obviously, there are no credential:
pkexec -u www-data php /mnt/Datos-Nube/www/nextcloud/occ files_external:list
+----------+-------------+------------+-------------------------------------+---------------------------------------------------------------------------------------------------+---------+------------------+-------------------+
| Mount ID | Mount Point | Storage | Authentication Type | Configuration | Options | Applicable Users | Applicable Groups |
+----------+-------------+------------+-------------------------------------+---------------------------------------------------------------------------------------------------+---------+------------------+-------------------+
| 15 | /Privada | SMB / CIFS | Log-in credentials, save in session | host: "10.107.20.167", share: "privada$", root: "$user", domain: "DMSAS" | | All | |
+----------+-------------+------------+-------------------------------------+---------------------------------------------------------------------------------------------------+---------+------------------+-------------------+
root@gr00snube1:/var/www/nextcloud# pkexec -u www-data php /mnt/Datos-Nube/www/nextcloud/occ files_external:verify 15

  • status: indeterminate
  • code: 2
  • message: No session credentials saved

imagen
imagen

@wiswedel
Copy link
Contributor

@Trujo-Dilar Have you tried applying the changes from this open PR?
#15637

@Trujo-Dilar
Copy link
Author

Trujo-Dilar commented Jun 13, 2019 via email

@kesselb
Copy link
Contributor

kesselb commented Jun 13, 2019

$user should be replaced with the actual username right?

?

@Trujo-Dilar
Copy link
Author

Trujo-Dilar commented Jun 13, 2019

Yes
//server/share$/usuario1 work so
//server/share$/$user must work if actual user is usuario1

@CommonBlob
Copy link

Hi, I can confirm that we are also seeing the same sort of problem.

I have created 2 external storage paths to an SMB folder. 1 using $user, 1 using my username.
If I share a file/folder in the one with $user when going to the share it says the file is missing. If i share exactly the same file/folder with the externalstorage using my username, it works as expected.

It seems $user is not getting resolved in some situations. In our situation its when sharing.

This is also on 16.0.1

@kesselb
Copy link
Contributor

kesselb commented Jun 13, 2019

I'm having a hard time understanding your problem. It looks more like a configuration issue. Is something broken in nextcloud 16 that worked in nextcloud 15?

NOT other user, so, it's possible user username instead of UID?

https://docs.nextcloud.com/server/16/admin_manual/configuration_user/user_auth_ldap.html#special-attributes i think your are looking for "User Home Folder Naming Rule"

@scanom
Copy link

scanom commented Jun 13, 2019

I ran some test and I'm experiencing the same issue on a testing instance. I can mount the $user share, but sharing a file from that share leads to a file not found. 16.0.1 has the issue, 15.0.8 working fine tho.

@scanom
Copy link

scanom commented Jun 17, 2019

Doing some test today and when opening a file with onlyoffice inside an external storage with $user variable, the file cannot be found.

@Trujo-Dilar
Copy link
Author

You are right I change:
ldapExpertUUIDUserAttr with samaccountname
and right now it work.
Thank very much.

@bigfoot87
Copy link

Same problem here after latest update.

Shares using the $user variable are accessible but OnlyOffice can't access the files and sharing files doesn't work either.

In our configuration ldapExpertUUIDUserAttr is already SamAccountName. So that doesn't make any difference.

@BKdilse
Copy link

BKdilse commented Jun 20, 2019

I've got a similar issue, I've already applied the fix for the Share$, but I want to use $user. Where exactly are you making the samaccountname change?

@bigfoot87
Copy link

bigfoot87 commented Jun 21, 2019

I've got a similar issue, I've already applied the fix for the Share$, but I want to use $user. Where exactly are you making the samaccountname change?

In your LDAP/ AD-settings;

Expert - UUID Attribute for Users

For me this doesn't solve the problem.

@BKdilse
Copy link

BKdilse commented Jun 21, 2019

Thanks, I forgot to update this.
I've found the setting that works for me:
LDAP / AD Integration > Expert > Internal Username Attribute: sAMAccountName.

Now Home drive is available in External Storages:
Share: Shares$
Remote subfolder: Home\$user

I did have to make the other change too to get hidden shares to work:
#15567 (comment)

Have you tried these?

@bigfoot87
Copy link

Now Home drive is available in External Storages:
Share: Shares$
Remote subfolder: Home\$user

Thanks for your update. We can access our SMB-shares using $user, that never was a problem for us.

Can you also share a file on the share using the $user variable and download this file using the share link? For me the response will be "The document could not be found on the server. Maybe the share was deleted or has expired?" Also; we use OnlyOffice. Documents from shares using $user can't be opened as well.

@scanom
Copy link

scanom commented Jun 21, 2019

@bigfoot87 I had the issue as I posted before. I solved it by setting the $user variable as sAMAccountName. That is an expert option found at AD integration, it wasn't there on NC 15.

@bigfoot87
Copy link

@scanom The symptoms you're describing are the same in your earlier post are the same.. but I can't figure out the setting you are referring to. Is it "UUID Attribute for Users" or "Internal Username Attribute"? Both settings are pointing to sAMAccountName in my configuration. Or does this setting only apply to new LDAP-users?

@scanom
Copy link

scanom commented Jun 25, 2019

@bigfoot87 You can find the setting in: LDAP Integration -> Advanced -> Special attributes -> "$home" Placeholder Field.

In my configuration my home folder naming is the same as sAMAccountName, so I set that parameter and everything worked like before.

@bigfoot87
Copy link

@bigfoot87 You can find the setting in: LDAP Integration -> Advanced -> Special attributes -> "$home" Placeholder Field.

In my configuration my home folder naming is the same as sAMAccountName, so I set that parameter and everything worked like before.

Thank you. I changed the $home variable to sAMAccountName (our home folders also use the sAMAccountName format) and changed the paths in External Storage settings to use $home instead of $user. The problem still exists.. shares are accessible but OnlyOffice and shared links return the 'File not found' error.

@scanom
Copy link

scanom commented Jun 25, 2019

@bigfoot87 Do not change the external storage variable, keep $user as before. I have also set sAMAccountName as the Internal Username Attribute (LDAP Integration -> Expert -> Internal Username -> Internal Username Attribute)

@bigfoot87
Copy link

@bigfoot87 Do not change the external storage variable, keep $user as before. I have also set sAMAccountName as the Internal Username Attribute (LDAP Integration -> Expert -> Internal Username -> Internal Username Attribute)

Also not working for us unfortunately. The Internal Username Attribute is also set to sAMAccountName.. but still no luck.

@halms
Copy link

halms commented Jun 28, 2019

This seems to be a duplicate (or at least closely related) to #15599.

@4001982248998
Copy link

also not working in NC 15.0.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info
Projects
None yet
Development

No branches or pull requests

10 participants