#19313 closed enhancement (duplicate)
improved file system install method detection - allow direct install if user or group permissions match
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.2.1 |
| Component: | Upgrade/Install | Keywords: | has-patch |
| Focuses: | Cc: |
Description
The reason I made this patch was because all versions of WordPress that I've installed on my local debian server fail to automatically use the direct file system method.
The permissions structure of my server allows group write access to the web folders. The current method only does a single myuid() check. I've expanded this to check for groupid and also included the posix methods.
It saves having to modify the wp-config with FS_METHOD to allow plugins/themes to be installed more easily.
I hope this helps make plugin/theme installations easier on similarly configured web hosts, without having to bother with FTP install etc.
Attachments (1)
Change History (6)
#2
@
14 years ago
- Cc sirzooro added
posix_* functions are not available on Windows - you need to check if they are present before calling them.
#3
@
14 years ago
- Resolution set to duplicate
- Status changed from new to closed
- Type changed from defect (bug) to enhancement
Thanks for adding the related tickets Sergey. This is the first time I've tried contributing to WordPress. I didn't see the related tickets when doing my intial search, which wasn't exhaustive enough by the looks of it :p
Hmm, seems this patch may cause other issues, and the posix functions not being available on windows should be checked for existence as well. Yes I just realised, thanks sirzooro.
I've marked it as duplicate, and perhaps I might submit a patch to include a commented line of define('FS_METHOD, 'direct'); in wp-config instead, to make people more aware of it ...?
#5
@
14 years ago
I might submit a patch to include a commented line of define('FS_METHOD, 'direct'); in wp-config instead, to make people more aware of it ...?
I'd want to avoid that too, Core should automatically select the best option for the environment it's on, WordPress should be able to determine it better than most users can (Face it, most users think their host is secure too, I'd be willing to be a large chunk that currently use FTP upgrades are quite simply, not, and allow for cross-account file modifications in the wrong situation).
If there's a case where we should take into account the group settings for creating new files then it's a worthy addition, unfortunately, since WordPress can't change the ownership of files from group:group to user:group, the only case of user:group files being created should be handled by the existing code.
Related: #8400, #10205, #10424, #15021, #17373