plugins – Change upload folder for a CPT

I have a CPT called “Musterkuechen”. Users have access to a custom dashboard that I created with ACF Frontend. They do not have access to the wordpress backend.

When I create a new post in the backend of wordpress, all media ends up in the folder “musterkuechen”.

However, when a User create a new post using the custom dashboard, the media goes into the standard uploads folder.
My script works in the wordpress backend dashboard, but not in the custom dashboard that I’ve made for my users.

What did I miss to make it work in the custom user dashboard?

Here is the Code:

add_filter('upload_dir', 'rrwd_upload_dir');

$upload = wp_upload_dir();
// remove_filter('upload_dir', 'rrwd_upload_dir');

function rrwd_upload_dir( $upload ) {

$id = $_REQUEST('post_id');
  $parent = get_post( $id )->post_parent;

  // Check the post-type of the current post
  if( "musterkuechen" == get_post_type( $id ) || "musterkuechen" == get_post_type( $parent ) )
    $upload('subdir') = '/musterkuechen' . $upload('subdir');

  $upload('path') = $upload('basedir') . $upload('subdir');
  $upload('url')  = $upload('baseurl') . $upload('subdir');

  return $upload;

linux – Modify folder permissions of parent directory that were automatically created by autofs

I am currently following this guide to setup CentOS 8 to automount samba shares.

I am aware that we can change autofs auto mounted folders permissions using


and it does technically work

Here’s my current setup, so my auto.master contains the following

/mnt/smb /etc/

* -fstype=autofs,-Dhost=& file:/etc/auto.smb.sub


* -fstype=cifs,sec=ntlmv2,credentials=${HOME}/.${host}.smbpasswd,uid=${UID},gid=sambausers,file_mode=0770,dir_mode=0770,nounix ://${host}/&

with all the configuration above, /mnt/smb/192.168.x.x /shared_folder does have the expected permissions, however the permissions for its parent directories /mnt/smb and /mnt/smb/192.168.x.x are owned by root and does not follow the configuration from autofs.

I even tried to modify /mnt (which is not auto created by autofs)to the corresponding permissions but what happens is that the created smb folder still is owned by root and does not follow the permissions at all of its parent directory. Did I miss anything in my configuration? I tried adding uid=...,gid=...,file_mode=... to, but the same issue persists.

with the current setup described above autofs makes the following

  • /mnt/smb – owned by root
  • /mnt/smb/192.168.x.x – owned by root
  • /mnt/smb/192.168.x.x/shared_folder – owned by sambausers (custom group I made)

but what I wanted was

  • /mnt/smb – owned by sambausers with 0770
  • /mnt/smb/192.168.x.x – owned by sambausers with 0770
  • /mnt/smb/192.168.x.x/shared_folder – owned by sambausers with 0770

Can I link to a SharePoint document using the site name, folder, and name?

I have a SharePoint folder of documents named uniformly. I was hoping there was an easy way to link to the document without having to share it/generate a link ID at first. I’d like to embed this in a report so users can quickly pull up a summary.

e.g. Documents/Forms/myfilename.doc

Is this possible? If I try, it assumes myfilename.doc is a folder.

How to add on a site page a button allowing to upload a folder (and not files individually) to a document library?

I am designing a sharepoint site for a team so we can share documentation with external users. I wish to add a button on the homepage for the colleagues who will upload documentation with me. Once the upload is done, a flow with power automate analyze the information and parse it in several document libraries – and this part is OK for the moment. I would just need to add this button, so I am sure the folder they upload goes to right library. I have done a lot of research on the topic, but cannot find any help – especially since I want to upload a folder and not files.

share – Quick way for copying link to file or folder for people with existing access (Sharepoint/Office365)

I often want to create a link to a Sharepoint/O365 file or folder that I use in meeting notes, wiki pages, etc. For files that I have synced to my local file system using the OneDrive Client, I can do so by the following procedure in Windows explorer:

  1. Right-click on the file or folder
  2. Click on “Share”
  3. Select “People with existing access” from the drop-down menu
  4. Hit “Apply”
  5. Click on “Copy link”

This takes up quite a bit of time. Is there a shortcut or some other quick way of getting the link?

sharepoint online – Delete unique permissions of a File or Folder in a document library

I have a document library which has 3 folders in it and inside each folder there is a document (docx, xls, ppt).

My objective is to iterate every file inside my document library and check if It has unique permissions and If it does it should remove them.

For the folder part I already have this code working properly which fetches the root folder and prints if it has unique permissions.

$siteUrl = "https://****"
Connect-PnPOnline –Url $siteURL –Credentials **
$context = Get-PnPContext 
$ListName="List name"

$list = Get-PnPList $ListName
$folders = $list.RootFolder.Folders

foreach($folder in $folders)
  if($folder.ItemCount -gt 0)
    $f = Get-PnPFolder -Url $folder.ServerRelativeUrl -Includes ListItemAllFields.RoleAssignments, ListItemAllFields.HasUniqueRoleAssignments

    Write-Host $f.ServerRelativeUrl -> $f.ListItemAllFields.HasUniqueRoleAssignments

For the document / item part I’m struggling a bit because I cant seem to put this to work.
It always gives me that the item is not part of a list.


So my questions is:

How do I check if a item / document has unique permissions and how to remove them?

google workspace – Is it possible to save files (e.g., screenshots) via a Chrome extension directly to a Saved Drive / Team Drive folder?

Is it possible to save files (e.g., screenshots) via a Chrome extension directly to a Saved Drive / Team Drive folder? I’ve been having trouble finding an answer to this, as most sites seem to focus on generally available solutions for saving to a personal Drive folder.

For context, I am using Google Workspace, which features Shared Drives (formerly Team Drives) for common, shared workspaces and file sharing among teams.

I am looking to set up a workflow whereby team members can capture screenshots and have them saved into a common repository, but am running into a wall when trying to target the Shared Drive folder since these extensions only seem to have permission / are only set up to access the “My Drive” folders.

Has anyone found any solutions or workarounds that allow you to integrate with the Shared Drives / Team Drives features of the Google work apps suite or help with targeting these Shared Drives instead of a folder in My Drive? Thanks!