Solved Command line fun 'n' games

Currently reading
Solved Command line fun 'n' games

241
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?! 🤔
 

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

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,910

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