Solved Command line fun 'n' games

Currently reading
Solved Command line fun 'n' games

239
35
NAS
DS918+
Operating system
  1. macOS
Mobile operating system
  1. iOS
I need to edit a config file in /volume1/docker/nextcloud/config so I've SSH'd in as 'nasadmin' cos I don't know the root user's password (should I?).

I want to firstly copy the config.php file as config-original.php in case it all goes wrong then edit a couple of lines.

Here's the contents of the config directory


Code:
drwxrwxrwx+ 1 33 root   300 Jun 13 23:50 .
drwxrwxrwx+ 1 33 root   412 Jun 13 23:05 ..
-rw-r--r--  1 33 root    60 Jun 13 23:05 apache-pretty-urls.config.php
-rw-r--r--  1 33 root    70 Jun 13 23:05 apcu.config.php
-rw-r--r--  1 33 root   377 Jun 13 23:05 apps.config.php
-rw-r-----  1 33   33   979 Jun 13 23:50 config.php
-rw-r--r--  1 33 root 55973 Jun 13 23:05 config.sample.php
-rw-r--r--  1 33 root   495 Jun 13 23:05 .htaccess
-rw-r--r--  1 33 root   476 Jun 13 23:05 redis.config.php
-rw-r--r--  1 33 root   674 Jun 13 23:05 reverse-proxy.config.php
-rw-r--r--  1 33 root   669 Jun 13 23:05 smtp.config.php

Maybe a side issue but the first thing that jumps out is that config.php is in the group '33' whereas every other file here - and all the other files in the other directories for the Nextcloud data are 'root'. Is this a potential problem? I don't think so but have I inadvertently changed the group?

So, I'm hard, I know how to use Terminal on me Mac. All I need say is:
Code:
nasadmin@MyNAS:/volume1/docker/nextcloud/config$ cp config.php config-original.php
But...
Code:
cp: cannot open ‘config.php’ for reading: Permission denied
So either I want to be logged in as root - in which case where do I find the password - or can I 'sudo'?
Code:
nasadmin@MyNAS:/volume1/docker/nextcloud/config$ sudo cp config.php config-original.php

What could possibly go wrong?! 🤔
 
Done that then! Thanks for the tip @Rusty. I then discovered there's no Nano so had to use Vi to add "nextcloud.mydomain.tld" to the Trusted Domains section.

And it works :D
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

  • Question
Using "fast startup"? Disable that. Map attempts before the network is fully up will fail. Event Viewer...
Replies
2
Views
2,503
I am running Synology DS920+ with DSM 7.1.1-42962 Update 4 I want to run ncat command to check for open...
Replies
0
Views
1,160
I know this is late - and it is for your info only, but just an FYI: I bought two of these switches and...
Replies
7
Views
1,632
Purchase of NAS is similar to purchase of a car. When you take care only about: - must be short as first...
Replies
8
Views
4,320
I have a single disk eSata drive connected to my DS218+. I'm using it to hold my Video Station library...
Replies
5
Views
2,340
Google drive, and from google drive you can run a cloud sync to get it back to synology. another very...
Replies
7
Views
1,623

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top