public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* Re: [pbs-devel] possible problem in get_user_run_dir()
@ 2021-05-06  7:29 Dietmar Maurer
  2021-05-06  7:36 ` Stefan Reiter
  0 siblings, 1 reply; 4+ messages in thread
From: Dietmar Maurer @ 2021-05-06  7:29 UTC (permalink / raw)
  To: Stefan Reiter, pbs-devel

> Yes, already had an off-list discussion with Fabian about this, the 
> problem here is that /run/proxmox-backup might not exist when this is 
> run, but only root can create it 

Why do you want to use that directory at all? This is meant 
for proxmox-backup server status, not for arbitrary user dada?




^ permalink raw reply	[flat|nested] 4+ messages in thread
* [pbs-devel] possible problem in get_user_run_dir()
@ 2021-05-06  6:39 Dietmar Maurer
  2021-05-06  7:26 ` Stefan Reiter
  0 siblings, 1 reply; 4+ messages in thread
From: Dietmar Maurer @ 2021-05-06  6:39 UTC (permalink / raw)
  To: Stefan Reiter, pbs-devel

The code get_user_run_dir() looks wrong, because a normal user does not have
permissions required for tools::create_run_dir().

Please can you take a look at that? 

--- from src/bin/proxmox_client_tools/mod.rs---

pub fn get_user_run_dir() -> Result<std::path::PathBuf, Error> {
    let uid = nix::unistd::Uid::current();
    let mut path: std::path::PathBuf = buildcfg::PROXMOX_BACKUP_RUN_DIR.into();
    path.push(uid.to_string());
    tools::create_run_dir()?;
    std::fs::create_dir_all(&path)?;
    Ok(path)
}




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-06  7:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06  7:29 [pbs-devel] possible problem in get_user_run_dir() Dietmar Maurer
2021-05-06  7:36 ` Stefan Reiter
  -- strict thread matches above, loose matches on Subject: below --
2021-05-06  6:39 Dietmar Maurer
2021-05-06  7:26 ` Stefan Reiter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal