Installing plugins in a duplicate folder (from wordpress)
-
I used the plugin ‘Duplicator’ to duplicate my wordpress folder as two external files (the archive and php installer) and uploaded those into the projectionpictures folder with this path projection (name of the server)/web/projectionpictures.
I then opended the php file to complete the installation.
However when I sign into http://192.168.1.234/projectionpictures/wp-login.php and try to install or update further plugins I’m asked to enter connection information for the ftp address of my Synology unit. I’m not sure what the ftp address is but Synology inform me that port 21 is open. I don’t know what the ftp username or password is either, unless I do and don’t realise it.What do I have to do now so further plugins can be installed and updated in the newly created projectionpictures as I intend to make it a live site once the plugin problem is solved.
-
Internet HTTP(S) traffic is on 80 & 443. (S)FTP is 20-22 usually. I’ve no idea what the rest are for. I think you would at least want 80 and 443 to be accept both. Before opening ports, be sure the server file access is configured to first deny all to everything, then selectively grant access to other folders as required for your needs. The public web folders need to grant access to all. But all folders and file permissions should be read only to general users and groups, full control to owner. This is the typical security model for servers, unique configurations may be required.
It’s not clear to me why you need the IP to padlock, but it doesn’t hurt to ask.
Not long after I typed the above dead.letter showed up in the web/ directory but without photo.scr. I deleted the contents of projectionpictures and phpmyadmin and restored them from the backups I created after my last success at recovering the site. However this time so far that had not worked. I also had reinstall phpmyadmin as the permissions for the folder kept giving me error messages until I reinstalled it through package center (as we had last time with an error at a given line).
As the zips backups I last did failed to work I tried to use the previous backups to effect the same solution as last time and that hasn’t worked either. Is there a way for to a virus check on the zip backups I have for phpmyadmin and projectionpictures so it can detect dead.letter before I replace the DSM web/ folders with same contents. Didn’t think I would have to go through this again so soon.
Also this what should the folder permissions be for projectionfolders in DSM
at the moment I have for the web/ directory: ‘System’ and ‘Adminstrators’ each with FULL Control, then http (singular) and http (many) on READ only.For phpmyadmin with Owner -‘root’ in permissions – ‘System’ and ‘Administrators’ each with FULL Control, then http (singular) and http (many) on READ only.
Projectionpictures Owner – http, permissions the same as web/ directory
wordpress Owner – http, permissions the same as web/ directory (and this is still working )Is it possible the permissions for projectionpictures are the problem this time?
I deleted dead.letter from the web/ directory, could it have altered the contents of the index.html next to it?
-
This reply was modified 7 years, 3 months ago by
pr0ject10n.
Whether a scanner can scan into .zip files depends on the scanner. I think most of the major Windows scanners can do this. You may need to turn on the option in settings. There should also be a way to have it scan an individual file.
Your permissions scheme sounds OK. I don’t think poor permissions are directly the cause of strange files showing up. What is probably happening is there is hidden code somewhere that allows remote file management such as dropping photo.scr into place. Most executable code needs read & write permission, so permissions are ineffective in stopping this sort of infection once it’s in place. What needs to happen is this hidden code needs to be removed. Without the malicious code, dropping files becomes impossible.
How did the malicious code get there in the first place? Hard to say. Lax file permissions could have been the initial cause. Sometimes malicious code is hidden in innocuous data files, such as a .bmp image file. There could be a vulnerability in an app that is exploited. A user with a weak password could be the infection vector.
A WP installation could be vulnerable. WP core is pretty secure, but the security of plugins and themes are variable. Only use themes and plugins from reliable sources.
It is possible for malicious files like dead.letter to corrupt other files. While they may appear to be mere data, they can contain hidden executable code. This is possibly how those iframe elements got into phpMyAdmin files. That infection was pretty cack handed because it caused a syntax error.
I’ve deleted the contents of the projectionpictures folder in the web directory. I think I may have do delete myphpmyadmin contents as well to avoid a repetition of the dead.letter and photo.scr virus.
In phpmyadmin I removed the passwords needed to for each of the databases in there for root, wordpress_user, and projectionpictures as I’m going to use the wordpress 5 minute installation in from this guide.
http://pfbarrett.uk/transferring-a-wordpress-site-to-a-synology-nasUnfortunately the original wordpress login is now unable to login it simply gives me a screen with ‘Error establishing a database connection’. I can reset the login password to get into phpmyadmin but even if I renter the password that was in there for the wordpress_user the wordpress/wp-login is unable to access the connection, why?
I’ve done a wp all in one migration backup for wordpress and exported the sql from inside phpmyadmin
I’ve used it before to install projectionpictures. I’m going to try to get projectionpictures back up and running tonight.
-
This reply was modified 7 years, 3 months ago by
pr0ject10n.
Be sure the DB parameters in wp-config.php are correct. If they are correct and the user and password and DB name match the ones in phpMyAdmin, then WP should be able to connect to the DB. The DB host name must be correct as well. The host is often “localhost”, but there are notable exceptions.
The mySQL server must be up and running. If phpMyAdmin is working then it is up and running. I can’t think of any other reasons for a connection failure when the DB is at localhost. For other locations, a network communications failure could be the cause.
I decided to format the DSM entirely, I did back up the wordpress original to reflect the projectionpictures folder as I updated it before I did this as a number of virtual host ports were not working, especially ports 80 and 21.
All the necessary ports are now working, I installed wordpress, then I installed two plugins to import the back up ‘all in one migration and all in one migration extension. That all worked.
However I did try using the duplicator method to transfer but got stuck on permissions for the new folder in file station for projectionpictures. So I abandoned this method. Even though I’ve succeeded before.
So I’ve done ‘5 minute install’ again although that did ask me to create a wp-confing.php file from some text it provided and I did that and uploaded.
So I’m back to the wordpress dash in the projectionpictures folder and I can’t get any plugins in.
These file permissions for the projectionpictures folder are wrong – Owner http , with folder permission as ‘SYSTEM’ full control, ‘administrators’ full control and ‘http’ (in the plural) read only.
the root /web folder permissions are ‘http’ – read, ‘administrators’ – read and write, ‘http’ – custom read (traverse folders), ‘http’ – read. (I haven’t altered these in any way)
phpmyadmin is Owner – root, folder permissions are ‘admin’ custom read and write, ‘administrators’ – Read, ‘Everyone’ – Read ( I haven’t altered these in any way)
wordpress Owner – http, folder permissions are ‘http’ – custom (read and write), ‘http’ (plural) – read, ‘everyone’ – read. (I havent altered these in any way)
What should projectionpictures permissions be be so it can write to folders within it and specifically plugins?
Sorry about all this but onece I’ve sorted this part I can get the website site up as I know the rest. Overjoyed to get port 21 working so quickly.
-
This reply was modified 7 years, 3 months ago by
pr0ject10n.
I’ve had a fascinating 12 hours at my laptop trying to fix the projectionpictures plugin problem where its requests ftp details (Hostname, Ftp hostname, ftp password), but ended up where I started, but I do have some useful insights based on
http://pfbarrett.uk/transferring-a-wordpress-site-to-a-synology-nasguideThe guide mentioned changing permissions on the web/ (shared folder), phpmyadmin and projectionpictures and got an interesting insight into inherited permissions from the web/ directory. Due to that guide page both good and bad. I followed these permissions from that guide.
web folder should be
SYSTEM read
administrators Read and Write
http (multiple) ReadPhpmyadmin should have these permissions
Owner – Root (isnt specified)
SYSTEM read
administrators read and write
http (multiple) readProjectionpictures / Owner Admin (isn’t specified)
SYSTEM Custom (Read and Write)
administrators Full Control
http (multiple) Custom (Read and Write)
users Custom (Read and Write)The web/ folder was originally using these permissions:
admin read and write+delete
http (single) Read
administrator read and write+delete
http (multiple) read (all ticked)
http (multiple) traverse only.However after I did those changes the web/ permissions to
web folder should be
SYSTEM read
administrators Read and Write
http (multiple) ReadIt adversely affected the original wordpress folder and stopped the WP dash from installing plugins and I ‘was’ getting the exact same problem asking for ftp to install plug ins. So I had to get web/ to revert back to the original permissions but I lost:
http (single) Read. entry.Now all the folders, phpmyadmin (Owner:Root), projectionpictures (Owner:http) and wordpress (Owner:http)
Are using:SYSTEM Custom (Read and Write)
administrators Full Control
http (multiple) Custom (Read and Write)
users Custom (Read and Write)I this coding to .htacces file and uploaded it to projectionpictures:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPressIn the projectionpictures folder I added this two lines at the bottom of wp-config-sample.php as directed to by that guide. I used this guide before but got stuck on the plugins.
//**The next line allows direct downloads*/ define('FS_METHOD', 'direct');But that hasn’t solved the downloads problem, ton install plugins for projectionpictures.
Does any other file in projectionpictures need any coding to solve this or does the folders permissions need additional or less entries and if so what exactly.
I have entered the correct password in phpmyadmin for the projectionpictures database.-
This reply was modified 7 years, 3 months ago by
pr0ject10n.
-
This reply was modified 7 years, 3 months ago by
pr0ject10n.
I have a possible solution to my plugin problem and it requires opening and editing the wp-config.php, although I haven’t tried it yet, I thought I would get your view on it. It came from this youtube link
To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.
If you are on shared hosting you might not have this problem but if you are on a VPS or Dedicated server you will most probably get asked to supply FTP credentials every time you want to install or upgrade plugin or even WordPress. This can become an annoyance if you install plugins a lot so this is one of the first things I always fix when I install new WordPress site.
Here is how to solve it: open your wp-config.php file (by default it can be found in your root WordPress directory) with text editor and simply add your ftp login information near the bottom of the wp-config.php file (just above the /** Sets up WordPress vars and included files. */ comment for example):
1 //*add your FTP credentials*
2 define(‘FTP_HOST’, ‘host_IP_or_FTP_url’);
3 define(‘FTP_USER’, ‘FTP_username’);
4 define(‘FTP_PASS’, ‘FTP_password’);
5 define(‘FTP’, true);or :
//*If you like and can use a SSL connection set this to true*
6 define(‘FTP_SSL’, true);After you do this your won’t be asked for FTP credentials anymore. There are other solutions like settings permission with chown via shell or installing suPHP on your server but this one seems to be the easiest.
If the above fails for whatever reason you can comment the above code and try adding the following code in the wp-config.php file,somewhere at the top:
1 define( ‘FS_METHOD’, ‘direct’ );
2 define( ‘FS_CHMOD_DIR’, 0777 );
3 define( ‘FS_CHMOD_FILE’, 0777 );This forces files to be writable by the server. You should only use this if adding FTP credentials method fails.
In your view is my IP 192.168.1.234, is the rest the user name and password I use to enter the DSM or it the user&password for the phpmyadmin login or the user and password for the projectionpictures database within the phpmyadmin.
FTP user credentials and mySQL/phpMyAmin database related user credentials are two different things and there is no overlap. You could use the same credentials for both, but that is not advisable. Also realize there is a place where you set the credentials and places you use the credentials. For example, DB user credentials are set in phpMyAdmin and used by PHP by way of what you provide in wp-config.php.
I’m not sure where you set FTP credentials in DSM. I expect there to be some sort of user interface. That is how it is done with commercial hosts. The credentials are used by PHP by way of what you provide in wp-config.php or by way of a popup that appears when PHP needs FTP access. While the appearance of this popup is annoying, it’s not a sign of anything being wrong per se. It only means the PHP user does not have unfettered automatic access to FTP. It is an unusual configuration, but not necessarily wrong. It probably improves security to some degree.
You said in a previous post that you added a definition for FS_METHOD to wp-config-sample.php. There is no reason to ever edit this file, it is merely an example of what could be in wp-config.php. It is not used by PHP when running WP. The effective place to put such a definition is wp-config.php.
I’m not sure what the difference is between user http (single) and user http (multiple). What is important regarding permissions for WP is that the user PHP runs as has read and write permission for /web and all sub-folders within. Including the /web/projectionpictures/ folder. Due to the cascading permissions concept, what is set in /web will apply to all sub-folders within as well, unless there are overriding settings in sub-folders somewhere.
What user does PHP run as? I don’t know, it’s whatever is set in the Apache configuration file. From what you’ve told me, it is probably the http user. This is a file system user, which is different than an FTP user. The file system user is similar to how you log into the operating system, but your login should be different than the user PHP runs as.
Editing wp-config.php to provide DB credentials and set unique authentication keys and salts is the only file edits you need to do to setup WP. WP will set .htaccess during installation and as needed. What you have manually set for .htaccess is correct.
You sure are learning a lot about Synology DSM! If anyone else has DSM trouble here, I’m sending them to you 😛
(I’m kidding, that is not how these forums work)OK so I’ve managed to figure out the login for the ftp screen, its the numbers of the IP address, then the user name and password for the DSM login. I do though have to enter those details every time I want to install a plugin (only). I can activate and deactivate at will. I can even import images without the ftp window popping up for credentials. So I have now imported the necessary all-in-one-wp-migration.6.64 and all-in-one-wp-migration-file-extension and imported the website I did do but I’ve removed a lot of the recent images I added before on the run and gun page.
I know how to use better-search-replace plugin (I would be lost without it !) and to replace http://192.168.1.234/projectionpictures with http://www.projectionpictures.com
and do the same in permalinks so that’s reflected in General Settings page so the site URL and Home URL read as http://www.projectionpictures.com.I update .htaccess with the different code (I actually have it ready in a file and upload it), as when I revert back to 192.168.1.234/projectionpictures it reverts the contents of its file back to what it was anyway.
However…
When I revert to http://www.projectionpictures.com/login, the WP login screen refuses to appear and so does the live website. Even if I use NORD VPN and relocate to Romania.
These are in router configurations:
5000 Management UI, File Station
21 FTP Server
5005 WebDAV Server
5006 WebDAV Server
80 Virtual Host
443 Virtual Host
5001 Management UI, File StationThe DDNS is still the same number thats lodged with Synology.com and is still in place with 1and1. I have the same Lets encrypt certificates in place for when I migrate to Https.
In Web station General Settings does it matter if Enable Personal Website is on or off. It has this sentence next to it: Enable this option to allow local users to create a personal website by uploading pages to the self-created ‘www’ folder in the user home
.
The 5 minute guide doesn’t mention having the personal website enabled. But I’ve decided to tick it for the time being, unless it should be unticked.And the web variants necessary are in Virtual Host:
projectionpictures.com
http://www.projectionpictures.com
projectionpictures.co.uk
http://www.projectionpictures.co.uk
projectionpictures
192.168.1.234.projectionpictures
wordpressLastly the folder permissions in web/ directory are:
‘System’ and ‘Adminstrators’ each with FULL Control, then http (singular) and http (many) on READ only.For phpmyadmin with Owner -‘root’ in permissions – ‘System’ and ‘Administrators’ each with FULL Control, then http (singular) and http (many) on READ only.
Projectionpictures Owner – http, System’ and ‘Administrators’ each with FULL Control, http (many) on READ only.
At the moment none of the permissions for the Projectionpictures folder are inherited from the web/ folder, there all setup up just for that folder.
I think the permissions on the projectionpictures folder PREVENTS the site from going live, what should they be?.Its affecting plugins as well below.
I got this entry in the dashboard
All in One WP Migration is not able to create /volume1/web/projectionpictures/wp-content/plugins/all-in-one-wp-migration/storage folder. You will need to create this folder and grant it read/write/execute permissions (0777) for the All in One WP Migration plugin to function properly.
All in One WP Migration is not able to create /volume1/web/projectionpictures/wp-content/plugins/all-in-one-wp-migration/storage/index.php file. Try to change permissions of the parent folder or send us an e-mail at [email protected] for assistance.
-
This reply was modified 7 years, 2 months ago by
pr0ject10n.
-
This reply was modified 7 years, 2 months ago by
pr0ject10n.
-
This reply was modified 7 years, 2 months ago by
pr0ject10n.
The FTP credentials popup appearing only sometimes is “normal” if we assume it appearing at all is acceptable. It only comes into play for server to server file transfer. Internal file system operations and browser to server uploads do not use the FTP server, so there is no popup. Whether this popup appears at all is related to file permissions applied to the FTP server. I’m not sure what’s required to cause the popup to not be necessary. I think it’s related to what user owns the folders that FTP accesses.
Whether you have to enter the FTP information every time or not is related to how your browser auto-fill settings work. I have one server where this popup occurs. All the fields are filled in whenever FTP is needed, I just need to click “Connect” when the popup appears. Obviously I have my browser’s auto-fill turned on. Every once in a while it “forgets” the password, but all the rest are always filled in.
Better search and replace is a good plugin. It’s based on the interconnect/it tool I was suggesting a while back. The UI is different, but it’s the same search and replace engine underneath.
Depending on the type of FTP used, you should open ports 20 and 22 in addition to 21 at the router. Be sure the FTP server will not accept anonymous connections. A user and password must be required for access.
The personal website option is something I’m not familiar with. Enabling it sounds like the right choice.
Since I’ve no idea what the PHP user is other than it could be http, you might grant http(many) read and write permissions for projectionpictures folder. The lack is likely why the migration plugin cannot create folders. AFAIK only read permission is required for the site to display. The PHP user needs write access to properly administer the site though.
I’m not sure why the site is not showing up. Perhaps verify that Apache and the mySQL servers are up and running? Or do they always auto start on power up? I have machines that work each way — one auto starts and the the other where manual start is required (it’s not a dedicated server).
Just a thought for Virtual Hosts ports 80 and 443 does it matter whether the port is labelled is configured as categories as Virtual Host or Web Station, Photo Station, Audio Station, Survelliance Station. As my External Access Router Configuration will allow me to choose either port number 80, 443 as either. Should both numbers be set on Virtual Host only or is essential that Web Station, Photo Station, Audio Station, Survelliance Station have a live port dedicated to them.
When I was trying to configure the folder permissions last night after your last response I managed to loose port access 21 in the NAS, I keep getting Failed Connection, even though it was open in the router. Although this has no affect on plugins being updated in the original wordpress folder, but projectionpictures does need port 21, as both wanted to update Social Media and Share Icons (Ultimate Social Media) plugin. Although I am finding trying to re-open it is very difficult even if you enable it in File Services and Control Panel > Services (both the port and the firewall), currently it is still fails to get a connection but it is still able to download plugin updates. Although when I try to uninstall a plugin from projectionpictures I am asked to approve it again with the pop (that wasn’t happening before, only before installing it).
Last of all I tried this in wp-config.php
//*add your FTP credentials* define(‘FTP_HOST’, ‘host_IP_or_FTP_url’); define(‘FTP_USER’, ‘FTP_username’); define(‘FTP_PASS’, ‘FTP_password’); define(‘FTP’, true);It didn’t work as it didn’t accept there was a FTP setup and therefore the DSM details I have been using wouldn’t work in that code.
Are there any youtube videos you would recommend to me that would assist me to understand setting up folder permission in the NAS to allow me to get the live site seen and the dashboard working.
Lastly I phoned my ISP provider and was told that non of the port numbers in my router were being blocked independently by them, and that there control was entirely my responsibility.
Should both numbers be set on Virtual Host only or is essential that Web Station, Photo Station, Audio Station, Survelliance Station have a live port dedicated to them.
In my mind “dedicated” isn’t exactly what is going on when you configure ports. Maybe it’s just semantics. What you are doing is telling the router’s firewall which apps can access which ports. Multiple apps can use the same port. Any app that needs to access the Internet via HTTP(S) protocol needs ports 80 and 443 open. I would say at least Web Station needs such access. For the others, it would depend on how they are used.
I’m sorry, I don’t know of any videos I can recommend regarding file permissions.
I’m going to be travelling for the next couple weeks. I’ll still be checking the forums here, but when and how often will become more erratic.
Thank you no change today to report. I will attempt the 5 minute install again but without the prior wordpress installation already. As I haven’t attempted that before I’ve always had wordpress installed in File Station before I’ve migrated to the live folder. 5 minute doesn’t rely on any installation to be in place first only an all-in-one back up to import in.
Enjoy your travels..wherever your off to.
I reinstall the entire DSM again and used the 5 minute install. I tried to follow the guide without installing wordpress in its own default folder as you normally would. However when I came to go through the wp-admin it refused to get past the 2nd screen as I was getting a 500 error. I eventually decided to install wordpress as you normally would as a plugin through the DSM panel. After it had done its own configurations it (as it affected the web/ folder on its own) it got me past the next screen to fill in Information Needed and I installed projectionpictures WP in its own folder with its own dedicated database in phpmyadmin.
GOOD NEWS (of a kind) this time the plugins install / update and can be deleted without needing to fill in a silly FTP pop window every time. That is what I had last time before the site went live, (its not at the moment). This small amount of code is in the config file at the bottom was added in by me:
//**The next line allows direct downloads*/ define('FS_METHOD', 'direct');So its working, but I think this is due to the face that the permissions for web/ and web/projectionpictures are different this time. And I’m not allowing projectionpictures to have inherited permissions from web/ folder (as I was before), it has its own explicit permissions. Before we didn’t know what the types of permissions mean as there normally 3 digit numbers in other systems.
I did find this though on Synology website: ACL permissions could be categorized as follows:
Administration:
Change permissions: This controls whether a user can change the permission of the file or folder.Take ownership: This controls whether a user has ownership of the file or folder.
Read:
Traverse folders/Execute files: This controls whether a user can run a program file.
List folders/Read data: This controls whether a user can read data in a file.
Read attributes: This controls whether a user can view the attributes of a file.
Read extended attributes: This controls whether a user can view the extended attributes of a file.
Read permissions: This controls whether a user can read the permissions of the file or folder.Write:
Create files/Write data: This controls whether a user can change the contents of a file.
Create folders/Append data: This controls whether a user can add data to the end of a file.
Write attributes: This controls whether a user can change the attributes of a file.
Write extended attributes: This controls whether a user can change the extended attributes of a file.
Delete subfolders and files: This controls whether a user can delete a folder.
Delete: This controls whether a user can delete a file.The file permissions for mine are now:
Web
admin Read and Write
anonymous Read and Write
SYSTEM Read
adminstrators Read and Write
http (multiple) Read and Write (and Write new addtion)
http (single) Read (new entry)projectionpictures owner admin
This accepts plugin/update/wpress import
admin Read and Write
anonymous Read and Write
SYSTEM Full Control
adminstrators Read and Write
http (multiple) Read and Write (and Write new addition)WordPress owner http
This accepts plugin/update/wpress import
admin Read and Write
annoymous Read and Write
SYSTEM FULL CONTROL
adminstrators Read and Write
http (multiple) Readphpmyadmin Owner Root
admin Read and Write
anonymous Read and Write
SYSTEM Read
adminstrators Read and Write
http (multiple) ReadI now get this ERR_CONNECTION_TIMED_OUT whenever I attempt to migrate from the IP projectionpictures address to just projectionpictures.com. That is just after the Better/Search/Replace has done the replacements, the only way I get back in, is in phpmyadmin and change the site URL back to the 192.168.1.234/projectionpictures. I’m not reseting the DSM again as I now have plugin permissions for wordpress and projectionpictures working on their own respectively.
For this evening I have reverted back to 192.168.1.234/projectionpictures. I think I will use Synology live messenger service tomorrow in the help section to see if I can get any headway with them and the permissions for the folders. As I’m that close. Bye the way the FTP port 21 Fails to get a connection in Control Panel > Router Configuration, but 5000, 5001, 5005, 5006, 80 VH, 443 VH, are working. Do I need to use WebDavServ to host the site I’ve installed it and it uses 5005 & 5006.
-
This reply was modified 7 years, 2 months ago by
pr0ject10n.
-
This reply was modified 7 years, 2 months ago by
pr0ject10n.
-
This reply was modified 7 years, 3 months ago by
The topic ‘Installing plugins in a duplicate folder (from wordpress)’ is closed to new replies.